Module ros2_client::steady_time
source · Expand description
Steady time has an arbitrary origin, but is guaranteed to run monotonically (i.e. non-decreasing), regardless of clock corrections or timezones.
Note Steady time is not actually steady in the sense that the underlying
clock would always run. Steady time clock might be paused e.g. because of
operating system sleep modes, hypervisors, or other infrastructure below
this library. This module is called steady_time
only to better conform to
ROS 2 naming.
The current implementation is based on std::time::Instant
. Because of
this, there is no directo conversion to/from nanoseconds, or other time
types.
Steady time should be used only when it is necessary, e.g. because of interacting with hardware. Steady time cannot be simulated. Use ROS time instead, whenever possible.
Structs§
- Monotonic time in nanoseconds
- Time difference can be negative, unlike std::time::Duration