ref: 422bc7217a71af4a1485202bb1870d40fd504870
dir: /libstd/now.myr/
use "sys.use"
use "types.use"
use "fmt.use"
pkg std =
const now : (-> time)
;;
const now = {
var tm
if clock_gettime(`Clockrealtime, &tm) == 0
-> (tm.sec*1000 + tm.nsec / (1000*1000)) castto(time)
else
-> -1
;;
}