libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Static Public Member Functions | Public Attributes | List of all members
qi::SystemClock Class Reference

The SystemClock class represents the system-wide real time wall clock. It may not be monotonic: on most systems, the system time can be adjusted at any moment. More...

#include <clock.hpp>

Public Types

using rep = Duration::rep
 The representation type of the duration and time_point. More...
 
using period = Duration::period
 The tick period of the clock in nanoseconds. More...
 
using duration = Duration
 The duration type of the clock. More...
 
using time_point = boost::chrono::time_point< SystemClock >
 

Static Public Member Functions

static time_point now ()
 Returns a time_point representing the current value of the clock. More...
 
static std::time_t to_time_t (const time_point &t) throw ()
 Converts a system clock time point to std::time_t. More...
 
static time_point from_time_t (const std::time_t &t) throw ()
 Converts std::time_t to a system clock time point. More...
 

Public Attributes

QI_API_DEPRECATED typedef
time_point 
WallClockTimePoint
 
bool is_steady = false
 

Detailed Description

The SystemClock class represents the system-wide real time wall clock. It may not be monotonic: on most systems, the system time can be adjusted at any moment.

Definition at line 167 of file clock.hpp.

Member Typedef Documentation

The duration type of the clock.

Definition at line 172 of file clock.hpp.

using qi::SystemClock::period = Duration::period

The tick period of the clock in nanoseconds.

Definition at line 171 of file clock.hpp.

using qi::SystemClock::rep = Duration::rep

The representation type of the duration and time_point.

Definition at line 170 of file clock.hpp.

using qi::SystemClock::time_point = boost::chrono::time_point<SystemClock>

The time_point type of the clock. Different clocks are permitted to share a time_point definition if it is valid to compare their time_points by comparing their respective durations.

Definition at line 178 of file clock.hpp.

Member Function Documentation

static time_point qi::SystemClock::from_time_t ( const std::time_t &  t)
throw (
)
static

Converts std::time_t to a system clock time point.

Parameters
tstd::time to convert.
Returns
A time point representing t.
static time_point qi::SystemClock::now ( )
static

Returns a time_point representing the current value of the clock.

static std::time_t qi::SystemClock::to_time_t ( const time_point t)
throw (
)
static

Converts a system clock time point to std::time_t.

Parameters
tTime point to convert.
Returns
A std::time_t representing t.

Member Data Documentation

bool qi::SystemClock::is_steady = false

true if t1 <= t2 is always true, else false.

Note
A SystemClock is never steady.

Definition at line 182 of file clock.hpp.

QI_API_DEPRECATED typedef time_point qi::SystemClock::WallClockTimePoint

Definition at line 187 of file clock.hpp.


The documentation for this class was generated from the following file: