#include <time.hh>
This supports values from epoch (1-Jan-1970 00:00:00Z) on at least 2038 (32-bit time_t) or much later (64-bit time_t), depending on the platform. It has nanosecond precision and supports a positive infinity time with the expected semantics.
Definition at line 31 of file time.hh.
Public Types | |
| enum | InfinityTime { tINFINITY } |
Public Member Functions | |
| Time (InfinityTime) | |
| Time (time_t seconds=0, long nanoseconds=0) | |
| Initializes with time since epoch (1-Jan-1970 00:00:00Z). | |
| const Time & | operator= (InfinityTime) |
| void | setToCurrent () |
| Sets to the current system time with best available precision. | |
| const struct timespec * | getTimespec () const |
| Returns the internal representation, or NULL if infinity. | |
Static Public Attributes | |
| const long | NANOSECS_PER_SEC = 1000000000 |
Private Attributes | |
| timespec | ts |
Friends | |
| bool | operator< (const Time &, const Time &) |
| bool | operator== (const Time &, const Time &) |
| const Time & | operator+= (Time &, const Timespan &) |
| Adds an interval to a time. | |
|
|
|
|
|
Definition at line 39 of file time.hh. References std::numeric_limits< Type >::max(), NANOSECS_PER_SEC, and ts. |
Here is the call graph for this function:

|
||||||||||||
|
Initializes with time since epoch (1-Jan-1970 00:00:00Z).
Definition at line 48 of file time.hh. References NANOSECS_PER_SEC, and ts. |
|
|
Returns the internal representation, or NULL if infinity. Used by functions which talk directly to the Unix API. Definition at line 76 of file time.hh. Referenced by atoms::Condition::wait(). |
|
|
Definition at line 54 of file time.hh. References std::numeric_limits< Type >::max(), NANOSECS_PER_SEC, and ts. |
Here is the call graph for this function:

|
|
Sets to the current system time with best available precision.
Definition at line 61 of file time.hh. Referenced by atoms::TimeoutDispatcher::main(), and atoms::TimeoutDispatcher::OperationMon::OperationMon(). |
|
||||||||||||
|
Adds an interval to a time. If the time is infinity, it will remain so; timespans are always non-negative, so they can not change its value. |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Definition at line 81 of file time.hh. Referenced by operator=(), and Time(). |
|
|
Definition at line 84 of file time.hh. Referenced by getTimespec(), atoms::operator+=(), atoms::operator<(), operator=(), atoms::operator==(), setToCurrent(), and Time(). |
1.3.5