package b0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.std/B0_std/Mtime/index.html
Module B0_std.Mtime
Source
Monotonic time stamps and spans.
This module provides support for representing monotonic wall-clock time. This time increases monotonically and is not subject to operating system calendar time adjustement. Its absolute value is meaningless.
To obtain and measure monotonic time use B0_std.Os.Mtime
.
Time spans
Timestamps
Note. Only use timestamps if you need inter-process time correlation, otherwise prefer B0_std.Os.Mtime.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.
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.
Predicates
Arithmetic
span t t'
is the span between t
and t'
regardless of the order between t
and t'
.
add_span t s
is the timestamp s
units later than t
or None
if the result overflows.