WFMath_TimeDiff man page

WFMath::TimeDiff — The difference between two timestamps.

Synopsis

#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.
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

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

Referenced by TimeDiff().

Author

Generated automatically by Doxygen for WFMath from the source code.

Info

Fri Feb 5 2016 Version 1.0.2 WFMath