libqi-api  2.4.3.28
 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

typedef int64_t rep
 The representation type of the duration and time_point. More...
 
typedef boost::nano period
 The tick period of the clock in nanoseconds. More...
 
typedef
boost::chrono::duration< rep,
period > 
duration
 The duration type of the clock. More...
 
typedef
boost::chrono::time_point
< SystemClock > 
time_point
 

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 158 of file clock.hpp.

Member Typedef Documentation

typedef boost::chrono::duration<rep, period> qi::SystemClock::duration

The duration type of the clock.

Definition at line 163 of file clock.hpp.

typedef boost::nano qi::SystemClock::period

The tick period of the clock in nanoseconds.

Definition at line 162 of file clock.hpp.

The representation type of the duration and time_point.

Definition at line 161 of file clock.hpp.

typedef boost::chrono::time_point<SystemClock> qi::SystemClock::time_point

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 169 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 173 of file clock.hpp.

QI_API_DEPRECATED typedef time_point qi::SystemClock::WallClockTimePoint

Definition at line 178 of file clock.hpp.


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