Type Alias tai_time::MonotonicTime
source · pub type MonotonicTime = TaiTime<0>;Expand description
Recommended TaiTime alias for the general case, using an epoch set at
1970-01-01 00:00:00 TAI.
The epoch of this timestamp coincides with the PTP epoch as defined by the
IEEE 1588-2008 standard, and with the
TAI64 epoch. It is, however,
distinct from the Unix epoch, which is set at 1970-01-01 00:00:00 UTC.
When no specific epoch is required, this timestamp should be considered the most sensible default as it makes it possible to easily convert TAI timestamps to Unix timestamps by simple subtraction of the TAI - UTC leap seconds.
§Examples
use tai_time::MonotonicTime;
// Set the timestamp one nanosecond after the 1970 TAI epoch.
let mut timestamp = MonotonicTime::new(0, 1);
assert_eq!(timestamp, "1970-01-01 00:00:00.000000001".parse().unwrap());Aliased Type§
struct MonotonicTime { /* private fields */ }