| Kudu C++ client API
    | 
A representation of a time interval. More...
#include <monotime.h>
| Public Member Functions | |
| MonoDelta () | |
| bool | Initialized () const | 
| bool | LessThan (const MonoDelta &rhs) const | 
| bool | MoreThan (const MonoDelta &rhs) const | 
| bool | Equals (const MonoDelta &rhs) const | 
| std::string | ToString () const | 
| void | ToTimeVal (struct timeval *tv) const | 
| void | ToTimeSpec (struct timespec *ts) const | 
| Converters into seconds representation (and ubiquitous SI prefixes). | |
| double | ToSeconds () const | 
| int64_t | ToMilliseconds () const | 
| int64_t | ToMicroseconds () const | 
| int64_t | ToNanoseconds () const | 
| Syntactic sugar: increment/decrement operators for MonoDelta. | |
| MonoDelta & | operator+= (const MonoDelta &delta) | 
| MonoDelta & | operator-= (const MonoDelta &delta) | 
| Static Public Member Functions | |
| static void | NanosToTimeSpec (int64_t nanos, struct timespec *ts) | 
| Converters from seconds representation (and ubiquitous SI prefixes). | |
| static MonoDelta | FromSeconds (double seconds) | 
| static MonoDelta | FromMilliseconds (int64_t ms) | 
| static MonoDelta | FromMicroseconds (int64_t us) | 
| static MonoDelta | FromNanoseconds (int64_t ns) | 
A representation of a time interval.
The MonoDelta class represents an elapsed duration of time – i.e. the delta between two MonoTime instances.
| kudu::MonoDelta::MonoDelta | ( | ) | 
| bool kudu::MonoDelta::Equals | ( | const MonoDelta & | rhs | ) | const | 
Check whether this time interval has the same duration as the specified one.
| [in] | rhs | A time interval for comparison. | 
true iff this time interval has the same duration as the the specified one. | 
 | static | 
| [in] | us | Time interval representation in seconds (with ubiquitous SI prefixes). | 
| 
 | static | 
| [in] | ms | Time interval representation in seconds (with ubiquitous SI prefixes). | 
| 
 | static | 
| [in] | ns | Time interval representation in seconds (with ubiquitous SI prefixes). | 
| 
 | static | 
| [in] | seconds | Time interval representation in seconds (with ubiquitous SI prefixes). | 
| bool kudu::MonoDelta::Initialized | ( | ) | const | 
true iff this object is initialized. | bool kudu::MonoDelta::LessThan | ( | const MonoDelta & | rhs | ) | const | 
Check whether this time interval is shorter than the specified one.
| [in] | rhs | A time interval for comparison. | 
true iff this time interval is strictly shorter than the specified one. | bool kudu::MonoDelta::MoreThan | ( | const MonoDelta & | rhs | ) | const | 
Check whether this time interval is longer than the specified one.
| [in] | rhs | A time interval for comparison. | 
true iff this time interval is strictly longer than the specified one. | 
 | static | 
Convert a nanosecond value to a timespec.
| [in] | nanos | Representation of a relative point in time in nanoseconds. | 
| [out] | ts | Placeholder for the resulting timespec representation. | 
Add a delta to current time interval.
| [in] | delta | The delta to add. | 
Substract a delta from current time interval.
| [in] | delta | The delta to substract. | 
| int64_t kudu::MonoDelta::ToMicroseconds | ( | ) | const | 
| int64_t kudu::MonoDelta::ToMilliseconds | ( | ) | const | 
| int64_t kudu::MonoDelta::ToNanoseconds | ( | ) | const | 
| double kudu::MonoDelta::ToSeconds | ( | ) | const | 
| std::string kudu::MonoDelta::ToString | ( | ) | const | 
| void kudu::MonoDelta::ToTimeSpec | ( | struct timespec * | ts | ) | const | 
Represent this time interval as a timespec structure, with nanosecond accuracy.
| [out] | ts | Placeholder for the result value. | 
| void kudu::MonoDelta::ToTimeVal | ( | struct timeval * | tv | ) | const | 
Represent this time interval as a timeval structure, with microsecond accuracy.
| [out] | tv | Placeholder for the result value. |