kudu::MonoTime Class Reference
Representation of a particular point in time.
More...
#include <monotime.h>
List of all members.
Detailed Description
Representation of a particular point in time.
The MonoTime class represents a particular point in time, relative to some fixed but unspecified reference point.
This time is monotonic, meaning that if the user changes his or her system clock, the monotime does not change.
Constructor & Destructor Documentation
kudu::MonoTime::MonoTime |
( |
|
) |
|
Build a MonoTime object. The resulting object is not initialized and not ready to use.
Member Function Documentation
void kudu::MonoTime::AddDelta |
( |
const MonoDelta & |
delta |
) |
|
Advance this object's time specification by the specified interval.
- Parameters:
-
[in] | delta | The time interval to add. |
bool kudu::MonoTime::ComesBefore |
( |
const MonoTime & |
rhs |
) |
const |
Check whether the point in time specified by this object is earlier than the specified one.
- Parameters:
-
[in] | rhs | The other MonoTime object to compare with. |
- Returns:
true
iff the point in time represented by this MonoTime object is earlier then the point in time represented by the parameter.
Select the earliest between the specified time points.
- Parameters:
-
[in] | a | The first MonoTime object to select from. |
[in] | b | The second MonoTime object to select from. |
- Returns:
- The earliest (minimum) of the two monotimes.
bool kudu::MonoTime::Equals |
( |
const MonoTime & |
other |
) |
const |
Check whether this object represents the same point in time as the other.
- Parameters:
-
[in] | other | The other MonoTime object to compare. |
- Returns:
true
iff the point in time represented by this MonoTime object is the same as the one represented by the other.
Compute time interval between the point in time specified by this and the specified object.
- Parameters:
-
[in] | rhs | The object that corresponds to the left boundary of the time interval, where this object corresponds to the right boundary of the interval. |
- Returns:
- The resulting time interval represented as a MonoDelta object.
bool kudu::MonoTime::Initialized |
( |
|
) |
const |
- Returns:
true
iff the object is initialized.
static MonoTime kudu::MonoTime::Max |
( |
|
) |
[static] |
- Returns:
- MonoTime equal to farthest possible time into the future.
static MonoTime kudu::MonoTime::Min |
( |
|
) |
[static] |
- Returns:
- MonoTime equal to farthest possible time into the past.
static MonoTime kudu::MonoTime::Now |
( |
|
) |
[static] |
Get current time in MonoTime representation.
- Returns:
- Time specification for the moment of the method's invocation.
Substract a delta from the point in time represented by the object.
- Parameters:
-
[in] | delta | The delta to substract. |
- Returns:
- Reference to the modified object.
std::string kudu::MonoTime::ToString |
( |
|
) |
const |
- Returns:
- String representation of the object (in seconds).
The documentation for this class was generated from the following file: