Skip to main content

Module time

Module time 

Source
Expand description

Conversions between monotonic, Unix and NTP time. Monotonic, Unix and NTP time.

Protocol logic measures time with a monotonic Instant, which cannot go backwards but has no absolute meaning. RTCP timestamps need the opposite: wall-clock time in NTP format. SystemInstant captures both once, so either can be derived from the other later without re-reading a clock that may have been adjusted in between.

Structs§

SystemInstant
A monotonic Instant paired with the wall-clock time it was taken at.

Functions§

near_leap_second
Whether the NTP timestamp ntp falls where a positive leap second could make it ambiguous: the last second of the last day of a month (UTC) or the second after it.