local open Time
val two_30 = Math.pow(2.0, 30.0)
in
val timestamp : unit -> time = now
val time_to_string :
time -> string = toString
fun dest_time t =
let val adjusted =
Real.-(toReal t, two_30)
val sec = Real.trunc adjusted
in
{sec=sec, usec=0}
end
fun mk_time {sec,usec} =
fromReal (Real.+(real sec, two_30))
fun time_eq (t1:time) t2 = (t1 = t2)
fun time_lt (t1:time) t2 = Time.<(t1,t2)
end
|