wfmath_timediff(3)
WFMath::TimeDiff – The difference between two timestamps.
Synopsis
#include <timestamp.h>
Public Member Functions
TimeDiff ()
construct an uninitialized TimeDiffTimeDiff (long msec)
construct a TimeDiff of a given number of milliseconds
long milliseconds () const
Get the value of a TimeDiff in milliseconds.
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 TimeDiffTimeDiff & operator-= (TimeDiff &, const TimeDiff &)
decrement a TimeDiffTimeDiff operator+ (const TimeDiff &a, const TimeDiff &b)
add two TimeDiff instancesTimeDiff operator- (const TimeDiff &a, const TimeDiff &b)
subtract two TimeDiff instancesTimeStamp & operator+= (TimeStamp &, const TimeDiff &)
advance a TimeStamp by a TimeDiffTimeStamp & operator-= (TimeStamp &, const TimeDiff &)
regress a TimeStamp by a TimeDiffTimeStamp operator+ (const TimeStamp &a, const TimeDiff &msec)
find the result of advancing a TimeStampTimeStamp operator- (const TimeStamp &a, const TimeDiff &msec)
find the result of regressing a TimeStampTimeDiff operator- (const TimeStamp &a, const TimeStamp &b)
find the time difference between two time stamps
Detailed Description
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 (<, <=, >, >=, ==, !=).
Member Function Documentation
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
Author
Generated automatically by Doxygen for WFMath from the source code.