package b0
Software construction and deployment kit
Install
dune-project
Dependency
Authors
Maintainers
Sources
b0-0.0.6.tbz
sha512=e9aa779e66c08fc763019f16d4706f465d16c05d6400b58fbd0313317ef33ddea51952e2b058db28e65f7ddb7012f328c8bf02d8f1da17bb543348541a2587f0
doc/b0.std/B0_std/Os/Mtime/index.html
Module Os.Mtime
Source
Monotonic time clock and sleep.
See B0_std.Mtime
for a discussion about monotonic time.
Monotonic clock
now ()
is the current system-relative monotonic timestamp. Its absolute value is meaningless.
elapsed ()
is the monotonic time span elapsed since the beginning of the program.
Monotonic wall-clock time counters
The type for monotonic wall-clock time counters.
count c
is the monotonic time span elapsed since c
was created.
Error handling
The functions elapsed
, now
, counter
, raise Sys_error
whenever they can't determine the current time or that it doesn't fit in Mtime
's range. Usually this exception should only be catched at the toplevel of your program to log it and abort the program. It indicates a serious error condition in the system.
Platform support
- Platforms with a POSIX clock (includes Linux) use
clock_gettime
with CLOCK_MONOTONIC. - Darwin uses
mach_absolute_time
. - Windows uses Performance counters.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page