ge211
Duration Class Reference

Detailed Description

A length of time.

This is an opaque type representing a high-precision segment of time that can be extracted as a double of seconds by the seconds() const member function. A Duration can be constructed from the number of seconds, also as a double. Duration values can also be compared, added, subtracted, and added and subtracted to Time_point values.

Definition at line 30 of file ge211_time.h.

Public Member Functions

 Duration ()
 Constructs the zero duration.
 
 Duration (double seconds)
 Constructs the duration of the given number of seconds.
 
double seconds () const
 Gets this duration in seconds.
 
long milliseconds () const
 Gets this duration, approximately, in milliseconds.
 
Comparisons
bool operator== (Duration other) const
 
bool operator!= (Duration other) const
 
bool operator< (Duration other) const
 
bool operator<= (Duration other) const
 
bool operator> (Duration other) const
 
bool operator>= (Duration other) const
 
Arithmetic
Duration operator+ (Duration other) const
 
Duration operator- (Duration other) const
 
Duration operator* (double factor) const
 
Duration operator/ (double factor) const
 
Durationoperator+= (Duration other)
 
Durationoperator-= (Duration other)
 
Durationoperator*= (double factor)
 
Durationoperator/= (double factor)
 

The documentation for this class was generated from the following file: