Page
Library
Module
Module type
Parameter
Class
Class type
Source
Mtime.SpanMonotonic time spans.
type t = spanSee Mtime.span.
val zero : spanzero is a span of 0ns.
val one : spanone is a span of 1ns.
val max_span : spanmax_span is 264-1ns.
abs_diff span span' is the absolute difference between span and span'.
n * dur is n times duration dur.
Warning. Does not check for overflow or that n is positive.
val ns : spanns is a nanosecond duration, 1·10-9s.
val us : spanus is a microsecond duration, 1·10-6s.
val ms : spanms is a millisecond duration, 1·10-3s.
val s : spans is a second duration, 1s.
val min : spanmin is a minute duration, 60s.
val hour : spanhour is an hour duration, 3600s.
val day : spanday is a day duration, 86'400s.
val year : spanyear is a Julian year duration (365.25 days), 31'557'600s.
val to_uint64_ns : span -> int64to_uint64_ns span is span as an unsigned 64-bit integer nanosecond span.
val of_uint64_ns : int64 -> spanof_uint64_ns u is the unsigned 64-bit integer nanosecond span u as a span.
val to_ns : span -> floatto_ns span is span in nanoseconds (1e-9s).
val to_us : span -> floatto_us span is span in microseconds (1e-6s).
val to_ms : span -> floatto_ms span is span in milliseconds (1e-3s).
val to_s : span -> floatto_s span is span in seconds.
val to_min : span -> floatto_min span is span in SI-accepted minutes (60s).
val to_hour : span -> floatto_hour span is span in SI-accepted hours (3600s).
val to_day : span -> floatto_day span is span in SI-accepted days (24 hours, 86400s).
val to_year : span -> floatto_year span is span in Julian years (365.25 days, 31'557'600s).
val pp : Format.formatter -> span -> unitpp_span ppf span formats an unspecified representation of span on ppf. The representation is not fixed-width, depends on the magnitude of span and uses locale independent standard time scale abbreviations.
val pp_float_s : Format.formatter -> float -> unitpp_float_s formats like pp does but on a floating point seconds time span value (which can be negative).
val dump : Format.formatter -> t -> unitdump ppf span formats an unspecified raw representation of span on ppf.