Monotonic clock
val elapsed : unit -> Mtime.span
elapsed ()
is the monotonic time span elapsed since the beginning of the program.
- raises Sys_error
see error handling
val now : unit -> Mtime.t
now ()
is the current system-relative monotonic timestamp. Its absolute value is meaningless.
- raises Sys_error
see error handling
val period : unit -> Mtime.span option
period ()
is the clock's period as a monotonic time span (if available).
Time counters
val counter : unit -> counter
counter ()
is a counter counting from now on.
- raises Sys_error
see error handling
val count : counter -> Mtime.span
count c
is the monotonic time span elapsed since c
was created.
Monotonic clock raw interface
now_ns ()
is the unsigned 64-bit integer nanosecond monotonic time span elapsed since the beginning of the program.
- raises Sys_error
see error handling
now_ns ()
is an unsigned 64-bit integer nanosecond system-relative monotonic timestamp. The absolute value is meaningless.
- raises Sys_error
see error handling
period_ns ()
is the clock's period as an unsigned 64-bit integer nanosecond monotonic time span (if available).