Essentially the same as std::chrono::system_clock except the time returned by SystemClock::now() can be "warped" (made to run faster than real time) for simulation purposes. To do this, set the appropriate parameters in SimulatorSettings.
More...
#include <goby/time/system_clock.h>
Essentially the same as std::chrono::system_clock except the time returned by SystemClock::now() can be "warped" (made to run faster than real time) for simulation purposes. To do this, set the appropriate parameters in SimulatorSettings.
Definition at line 47 of file system_clock.h.
◆ duration
Duration type.
We use microseconds (not nanoseconds) to avoid overflow at higher warp values
Definition at line 52 of file system_clock.h.
◆ period
◆ rep
◆ time_point
◆ now() [1/2]
template<typename TimeType >
TimeType goby::time::SystemClock::now |
|
static |
return the current system clock time in one of the representations supported by the convert() family of functions
Definition at line 382 of file convert.h.
◆ now() [2/2]
static time_point goby::time::SystemClock::now |
( |
| ) |
|
|
inlinestaticnoexcept |
Returns the current system time unless SimulatorSettings::using_sim_time is set to true, in which case a simulated time is returned that is sped up by the SimulatorSettings::warp_factor.
When using simulated time, the returned time (t_sim) is computed relative to SimulatorSettings::reference_time (t_0) with an accelerated progression by a factor of the SimulatorSettings::warp_time (w) such that: t_sim = (t-t_0)*w + t_0 A note when using MOOS middleware's MOOSTimeWarp: the value returned by this function is the same as MOOSTime() when
Definition at line 63 of file system_clock.h.
◆ unwarp()
◆ warp()
◆ is_steady
const bool goby::time::SystemClock::is_steady = false |
|
static |
The documentation for this struct was generated from the following files: