Affect_unix.MtimeSourceMonotonic time.
This time is measured by sampling this clock. It increases monotonically and, in contrast to Ptime, is not subject to operating system calendar time adjustments.
Warning. This relies on an Unix.unblocker being setup on the executing domain.
wait_for span blocks the caller until a minimum amount of span time has elapsed on the monotonic clock. The actual supported resolution is unspecified and may depend on scheduling but millisecond waits should be reasonably precise. Use observe_wait_for to measure the overshoot.
observe_wait_for is like wait_for but returns the actual amount of monotonic time that elapsed on the monotonic clock between the call and when it returned.
wait_for' span tag is the action for wait_for. The action invocation enables and synchronizes with tag after a minimum amount of span monotonic time has elapsed on the monotonic clock.
The type for monotonic wall-clock time counters.
count c is the amount of time that has elapsed on the monotonic clock since c was created.
elapsed () is the amount of time that has elapsed on the monotonic clock since the beginning of the program.
Note. Only use timestamps if you need inter-process time correlation, otherwise prefer elapsed and counters to measure time.
The type for monotonic timestamps relative to an indeterminate system-wide event (e.g. last startup). Their absolute value has no meaning but can be used for inter-process time correlation.
now () is the current system-relative timestamp on the monotonic clock. Its absolute value is meaningless.
is_earlier t ~than is true if and only if t occurred strictly before than.
is_later t ~than is true if and only if t occurred strictly after than.
span t0 t1 is the span between t0 and t1 regardless of the order between t0 and t1.
add_span t s is the timestamp s units later than t or None if the result overflows.
sub_span t s is the timestamp s units earlier than t or None if overflows.
to_uint64_ns t is t as an unsigned 64-bit integer nanosecond timestamp. The absolute value is meaningless.
to_uint64_ns t is t is an unsigned 64-bit integer nanosecond timestamp as a timestamp.
Warning. Timestamps returned by this function should only be used with other timestamp values that are know to come from the same operating system run.
pp is a formatter for timestamps.
clock_gettime with CLOCK_BOOTTIME. This means that sleep time is taken into account.clock_gettime with CLOCK_MONOTONIC.mach_continous_time, sleep time is taken into account. For MacOS < 10.12, mach_absolute_time is used, sleep time is not taken into account.