wfmath
1.0.3
A math library for the Worldforge system.
|
A time stamp. More...
#include <timestamp.h>
Public Member Functions | |
TimeStamp () | |
Construct an uninitialized TimeStamp. More... | |
bool | isValid () const |
Static Public Member Functions | |
static TimeStamp | now () |
set a TimeStamp to the current time More... | |
static TimeStamp | epochStart () |
set a TimeStamp to Jan 1, 1970 More... | |
Friends | |
bool | operator< (const TimeStamp &a, const TimeStamp &b) |
bool | operator== (const TimeStamp &a, const TimeStamp &b) |
std::ostream & | operator<< (std::ostream &os, const TimeStamp &) |
std::istream & | operator>> (std::istream &is, TimeStamp &) |
TimeStamp & | operator+= (TimeStamp &, const TimeDiff &) |
TimeStamp & | operator-= (TimeStamp &, const TimeDiff &) |
TimeStamp | operator+ (const TimeStamp &a, const TimeDiff &msec) |
TimeStamp | operator- (const TimeStamp &a, const TimeDiff &msec) |
TimeDiff | operator- (const TimeStamp &a, const TimeStamp &b) |
A time stamp.
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 (<, <=, >, >=, ==, !=).
Definition at line 117 of file timestamp.h.
|
inline |
Construct an uninitialized TimeStamp.
Definition at line 133 of file timestamp.h.
References WFMath::TimeDiff::operator+, WFMath::TimeDiff::operator+=, WFMath::TimeDiff::operator-(), and WFMath::TimeDiff::operator-=.
Referenced by epochStart().
|
static |
set a TimeStamp to Jan 1, 1970
Definition at line 154 of file timestamp.cpp.
References TimeStamp().
|
static |
set a TimeStamp to the current time
Definition at line 130 of file timestamp.cpp.