WFMath
1.0.2
|
The difference between two timestamps. More...
#include <timestamp.h>
Public Member Functions | |
TimeDiff () | |
construct an uninitialized TimeDiff | |
TimeDiff (long msec) | |
construct a TimeDiff of a given number of milliseconds | |
long | milliseconds () const |
Get the value of a TimeDiff in milliseconds. More... | |
std::pair< long, long > | full_time () const |
Get the value of a TimeDiff in (seconds, microseconds) | |
TimeDiff | operator- () const |
negate a TimeDiff | |
Friends | |
TimeDiff & | operator+= (TimeDiff &, const TimeDiff &) |
increment a TimeDiff | |
TimeDiff & | operator-= (TimeDiff &, const TimeDiff &) |
decrement a TimeDiff | |
TimeDiff | operator+ (const TimeDiff &a, const TimeDiff &b) |
add two TimeDiff instances | |
TimeDiff | operator- (const TimeDiff &a, const TimeDiff &b) |
subtract two TimeDiff instances | |
TimeStamp & | operator+= (TimeStamp &, const TimeDiff &) |
advance a TimeStamp by a TimeDiff | |
TimeStamp & | operator-= (TimeStamp &, const TimeDiff &) |
regress a TimeStamp by a TimeDiff | |
TimeStamp | operator+ (const TimeStamp &a, const TimeDiff &msec) |
find the result of advancing a TimeStamp | |
TimeStamp | operator- (const TimeStamp &a, const TimeDiff &msec) |
find the result of regressing a TimeStamp | |
TimeDiff | operator- (const TimeStamp &a, const TimeStamp &b) |
find the time difference between two time stamps | |
The difference between two timestamps.
This class implements the 'generic' subset of the interface in the fake class Shape, with the exception of the stream operators. It also has the full set of comparison * operators (<, <=, >, >=, ==, !=).
long WFMath::TimeDiff::milliseconds | ( | ) | const |
Get the value of a TimeDiff in milliseconds.
WARNING! This function does not check for overflow, if the number of milliseconds is large
Referenced by TimeDiff().