#include <Timestamp.h>
Public Types | |
enum | tOptions { NONE = 0, CURRENT_TIME = 0x1 } |
Public Member Functions | |
string | Format (bool machine_friendly=false) const |
double | getFloatTime () const |
string | getStringTime () const |
Timestamp | operator+ (double s) const |
double | operator- (const Timestamp &t) const |
Timestamp | operator- (double s) const |
bool | operator< (const Timestamp &t) const |
bool | operator<= (const Timestamp &t) const |
bool | operator== (const Timestamp &t) const |
bool | operator> (const Timestamp &t) const |
bool | operator>= (const Timestamp &t) const |
void | setTime (unsigned long secs, unsigned long usecs) |
void | setTime (const string &stime) |
void | setToCurrentTime () |
Timestamp (Timestamp::tOptions option=NONE) | |
~Timestamp (void) | |
Static Public Member Functions | |
static string | Format (double s) |
Protected Attributes | |
unsigned long | m_secs |
unsigned long | m_usecs |
Definition at line 31 of file Timestamp.h.
Definition at line 34 of file Timestamp.h.
Timestamp::Timestamp | ( | Timestamp::tOptions | option = NONE | ) |
Definition at line 45 of file Timestamp.cpp.
Timestamp::~Timestamp | ( | void | ) |
Definition at line 51 of file Timestamp.cpp.
string Timestamp::Format | ( | bool | machine_friendly = false | ) | const |
Returns the timestamp in a human-readable string
machine_friendly | if true, the returned string is formatted to yyyymmdd_hhmmss, without weekday or spaces |
Definition at line 167 of file Timestamp.cpp.
string Timestamp::Format | ( | double | s | ) | [static] |
Definition at line 195 of file Timestamp.cpp.
double Timestamp::getFloatTime | ( | ) | const |
Definition at line 85 of file Timestamp.cpp.
string Timestamp::getStringTime | ( | ) | const |
Definition at line 89 of file Timestamp.cpp.
Timestamp Timestamp::operator+ | ( | double | s | ) | const |
Definition at line 99 of file Timestamp.cpp.
double Timestamp::operator- | ( | const Timestamp & | t | ) | const |
Definition at line 95 of file Timestamp.cpp.
Timestamp Timestamp::operator- | ( | double | s | ) | const |
Definition at line 116 of file Timestamp.cpp.
Definition at line 147 of file Timestamp.cpp.
Definition at line 154 of file Timestamp.cpp.
Definition at line 161 of file Timestamp.cpp.
Definition at line 133 of file Timestamp.cpp.
Definition at line 140 of file Timestamp.cpp.
void DUtils::Timestamp::setTime | ( | unsigned long | secs, |
unsigned long | usecs | ||
) | [inline] |
Definition at line 52 of file Timestamp.h.
void Timestamp::setTime | ( | const string & | stime | ) |
Definition at line 72 of file Timestamp.cpp.
void Timestamp::setToCurrentTime | ( | ) |
Definition at line 55 of file Timestamp.cpp.
unsigned long DUtils::Timestamp::m_secs [protected] |
Definition at line 129 of file Timestamp.h.
unsigned long DUtils::Timestamp::m_usecs [protected] |
Definition at line 130 of file Timestamp.h.