Module type Tick.MCLOCK

module type MCLOCK = sig .. end
The type for monotonic time clocks.

MCLOCK provides access to monotonic wall-clock time. This time increases monotonically and is not subject to operating system calendar time adjustment. It can only be used to measure wall-clock time spans in a single program run. It will not correctly measure time spans across Tick.LIFECYCLE.suspend and Tick.LIFECYCLE.resume events as the monotonic clock does not increase during these two events.

Monotonic time

type ns_span = int64 
The type for nanosecond precision time spans. This is an unsigned 64-bit integer. It can measure up to approximatevely 584 Julian years before (silently) rolling over.
val elapsed_ns : unit -> ns_span
elapsed_ns () is the wall-clock time span elapsed since the beginning of the program. Note that this doesn't take into account time the program spends between two Tick.LIFECYCLE.suspend and Tick.LIFECYCLE.resume occurences.
val period_ns : unit -> ns_span option
period_ns () is if available Some d representing the clock's nanosecond period d.