LogCabin
|
Used to convert one or more SteadyClock::time_point values into values of the SystemClock. More...
#include <Time.h>
Public Member Functions | |
SteadyTimeConverter () | |
Constructor. | |
SystemClock::time_point | convert (SteadyClock::time_point when) |
Return the given time according the system clock (assuming no time jumps). | |
int64_t | unixNanos (SteadyClock::time_point when) |
Return the given time in nanoseconds since the Unix epoch according the system clock (assuming no time jumps). | |
Private Attributes | |
SteadyClock::time_point | steadyNow |
Time this object was constructed according to the SteadyClock. | |
SystemClock::time_point | systemNow |
Time this object was constructed according to the SystemClock. |
Used to convert one or more SteadyClock::time_point values into values of the SystemClock.
Using the same instance for many conversions is more efficient, since the current time only has to be queried once for each clock in the constructor.