LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
LogCabin::Core::Time::SteadyTimeConverter Class Reference

Used to convert one or more SteadyClock::time_point values into values of the SystemClock. More...

#include <Time.h>

List of all members.

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.

Detailed Description

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.

Definition at line 266 of file Time.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 221 of file Time.cc.


Member Function Documentation

Return the given time according the system clock (assuming no time jumps).

Definition at line 228 of file Time.cc.

Return the given time in nanoseconds since the Unix epoch according the system clock (assuming no time jumps).

Definition at line 242 of file Time.cc.


Member Data Documentation

Time this object was constructed according to the SteadyClock.

Definition at line 291 of file Time.h.

Time this object was constructed according to the SystemClock.

Definition at line 295 of file Time.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines