package b0

  1. Overview
  2. Docs
Software construction and deployment kit

Install

Dune Dependency

Authors

Maintainers

Sources

b0-0.0.4.tbz
sha512=665735c8b7a8674201be765bdd676a18d1e38eff35de9d44c3dc15e2bfed2247e8963c9a32ae62d9ca2d6cd1edebd849aac29fdd5a846c14a30feea3edfc0601

doc/b0_b00_std/B00_std/Os/Mtime/index.html

Module Os.Mtime

Monotonic time clock.

See B00_std.Mtime for a discussion about monotonic time.

Monotonic clock

val now : unit -> Mtime.t

now () is the current system-relative monotonic timestamp. Its absolute value is meaningless.

val elapsed : unit -> Mtime.span

elapsed () is the monotonic time span elapsed since the beginning of the program.

Monotonic wall-clock time counters

type counter

The type for monotonic wall-clock time counters.

val counter : unit -> counter

counter () is a counter counting from now on.

val count : counter -> Mtime.span

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

OCaml

Innovation. Community. Security.