package mirage-solo5

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type +'a io = 'a Lwt.t

Timeout operations.

module Monotonic : sig ... end

Monotonic time is time since boot (dom0 or domU, depending on platform). * Unlike Clock.time, it does not go backwards when the system clock is * adjusted.

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.

exception Timeout

Exception raised by timeout operations

val with_timeout : int64 -> (unit -> 'a Lwt.t) -> 'a Lwt.t

with_timeout d f is a short-hand for:

Lwt.pick [Lwt_unix.timeout d; f ()]
OCaml

Innovation. Community. Security.