Kudu C++ client API
|
Representation of a particular point in time. More...
#include <monotime.h>
Public Member Functions | ||||
MonoTime () | ||||
bool | Initialized () const | |||
MonoDelta | GetDeltaSince (const MonoTime &rhs) const | |||
void | AddDelta (const MonoDelta &delta) | |||
bool | ComesBefore (const MonoTime &rhs) const | |||
std::string | ToString () const | |||
bool | Equals (const MonoTime &other) const | |||
Syntactic sugar: increment/decrement operators for MonoTime. | ||||
Add a delta to the point in time represented by the object.
| ||||
MonoTime & | operator+= (const MonoDelta &delta) | |||
MonoTime & | operator-= (const MonoDelta &delta) | |||
Static Public Member Functions | |
static MonoTime | Now () |
static MonoTime | Max () |
static MonoTime | Min () |
static const MonoTime & | Earliest (const MonoTime &a, const MonoTime &b) |
Friends | |
class | MonoDelta |
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.
kudu::MonoTime::MonoTime | ( | ) |
Build a MonoTime object. The resulting object is not initialized and not ready to use.
void kudu::MonoTime::AddDelta | ( | const MonoDelta & | delta | ) |
Advance this object's time specification by the specified interval.
[in] | delta | The time interval to add. |
bool kudu::MonoTime::ComesBefore | ( | const MonoTime & | rhs | ) | const |
bool kudu::MonoTime::Equals | ( | const MonoTime & | other | ) | const |
Compute time interval between the point in time specified by this and the specified object.
[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. |
bool kudu::MonoTime::Initialized | ( | ) | const |
true
iff the object is initialized.
|
static |
|
static |
|
static |
Get current time in MonoTime representation.
Substract a delta from the point in time represented by the object.
[in] | delta | The delta to substract. |
std::string kudu::MonoTime::ToString | ( | ) | const |