A representation of a time interval.  
 More...
#include <monotime.h>
|  | 
| static void | NanosToTimeSpec (int64_t nanos, struct timespec *ts) | 
|  | 
|  | 
| Parameters
  
    | [in] | seconds/ms/us/ns | Time interval representation in seconds (with ubiquitous SI prefixes). | 
 ReturnsThe resulting MonoDelta object initialized in accordance with the specified parameter. 
 | 
| 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 | ( |  | ) |  | 
      
 
Build a MonoDelta object.
- Note
- A MonoDelta instance built with the this default constructor is "uninitialized" and may not be used for any operation. 
 
 
      
        
          | bool kudu::MonoDelta::Equals | ( | const MonoDelta & | rhs | ) | const | 
      
 
Check whether this time interval has the same duration as the specified one.
- Parameters
- 
  
    | [in] | rhs | A time interval for comparison. |  
 
- Returns
- trueiff this time interval has the same duration as the the specified one.
 
 
      
        
          | bool kudu::MonoDelta::Initialized | ( |  | ) | const | 
      
 
- Returns
- trueiff this object is initialized.
 
 
      
        
          | bool kudu::MonoDelta::LessThan | ( | const MonoDelta & | rhs | ) | const | 
      
 
Check whether this time interval is shorter than the specified one.
- Parameters
- 
  
    | [in] | rhs | A time interval for comparison. |  
 
- Returns
- trueiff 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.
- Parameters
- 
  
    | [in] | rhs | A time interval for comparison. |  
 
- Returns
- trueiff this time interval is strictly longer than the specified one.
 
 
  
  | 
        
          | static void kudu::MonoDelta::NanosToTimeSpec | ( | int64_t | nanos, |  
          |  |  | struct timespec * | ts |  
          |  | ) |  |  |  | static | 
 
Convert a nanosecond value to a timespec.
- Parameters
- 
  
    | [in] | nanos | Representation of a relative point in time in nanoseconds. |  | [out] | ts | Placeholder for the resulting timespec representation. |  
 
 
 
      
        
          | std::string kudu::MonoDelta::ToString | ( |  | ) | const | 
      
 
- Returns
- String representation of this interval's duration (in seconds). 
 
 
      
        
          | void kudu::MonoDelta::ToTimeSpec | ( | struct timespec * | ts | ) | const | 
      
 
Represent this time interval as a timespec structure, with nanosecond accuracy.
- Parameters
- 
  
    | [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.
- Parameters
- 
  
    | [out] | tv | Placeholder for the result value. |  
 
 
 
The documentation for this class was generated from the following file: