package mirage-xen

  1. Overview
  2. Docs

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.

type time_kind = [
  1. | `Time
  2. | `Interval
]
type 'a t constraint 'a = [< time_kind ]
val time : unit -> [ `Time ] t

Read the current monotonic time.

val (+) : 'a t -> [ `Interval ] t -> 'a t
val (-) : 'a t -> [ `Interval ] t -> 'a t
val interval : [ `Time ] t -> [ `Time ] t -> [ `Interval ] t
val of_nanoseconds : int64 -> _ t

Conversions. Note: still seconds since boot.

OCaml

Innovation. Community. Security.