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