Module Duration
Source Duration - conversions to various time units
A duration is represented in nanoseconds as an unsigned 64 bit integer. This has a range of up to 584 years, or 213503 days, or 5124095 hours, or 307445734 minutes, or 18446744073 seconds, or 18446744073709 milliseconds, or 18446744073709549 microseconds.
All functions converting to t
raise Invalid_argument
on out of bound or negative input.
v0.2.1 - homepage
The type for a duration, exposed as an int64 to provide interoperability.
pp ppf t
prints the duration in a concise way.
of_us us
are the microseconds in nanoseconds.
of_us_64 us
are the microseconds in nanoseconds.
of_ms ms
are the milliseconds in nanoseconds.
of_ms_64 ms
are the milliseconds in nanoseconds.
of_sec s
are the seconds in nanoseconds.
of_sec_64 s
are the seconds in nanoseconds.
of_min m
are the minutes in nanoseconds.
of_hour h
are the hours in nanoseconds.
of_day d
are the days in nanoseconds.
of_year y
are the years in nanoseconds.
of_f f
is the floating point seconds in nanoseconds.
to_us t
are the microseconds of t
.
to_us_64 t
are the microseconds of t
.
to_ms t
are the milliseconds of t
.
to_ms_64 t
are the milliseconds of t
.
to_sec t
are the seconds of t
.
to_sec_64 t
are the seconds of t
.
to_min t
are the minutes of t
.
to_hour t
are the hours of t
.
to_day t
are the days of t
.
to_year t
are the years of t
.
to_f t
is the floating point representation of t
.