pub struct Timestamp { /* private fields */ }
Expand description
Representation of time instants in DDS API and RTPS protocol. Similar to
std::time::Instant
.
Quoting RTPS 2.3 spec 9.3.2.1:
The representation of the time is the one defined by the IETF Network Time Protocol (NTP) Standard (IETF RFC 1305). In this representation, time is expressed in seconds and fraction of seconds using the formula: time = seconds + (fraction / 2^(32))
The time origin is represented by the reserved value TIME_ZERO and corresponds to the UNIX prime epoch 0h, 1 January 1970.
Note : While NTP uses the same time representation as RTPS, it does not use the Unix epoch (1970-01-01 00:00). NTP uses the beginning of the 20th century epoch (1900-01-01 00:00) instead. So the RTPS timestamps are not interchangeable with NTP.
The timestamps will overflow in year 2106.
This type is called Time_t in the RTPS spec.