module Monotonic : sig ... end
val restart_threads : (unit -> [ `Time ] Monotonic.t) -> unit
restart_threads time_fun
restarts threads that are sleeping and whose wakeup time is before time_fun ()
.
val select_next : unit -> [ `Time ] Monotonic.t option
select_next ()
is Some t
where t
is the earliest time when one sleeping thread will wake up, or None
if there is no sleeping threads.
val sleep_ns : int64 -> unit Lwt.t
sleep_ns d
Block the current thread for n
nanoseconds.