ddc
|
#include <ddcTime.h>
Public Member Functions | |
DDCTimeUnix () | |
DDCTimeUnix (const time_t time_) | |
DDCTimeUnix (const DDCTimeUnix &X) | |
virtual | ~DDCTimeUnix () |
void | Set () |
void | Set (const time_t time_) |
void | Set (const DDCTimeUnix &t) |
time_t | Time () const |
struct tm | CalendarTime () const |
virtual void | DateTime (char *DateBuf, char *TimeBuf) const |
std::string | DateStr () const |
std::string | TimeStr () const |
double | Elapsed (const DDCTimeUnix &t0) const |
Static Public Member Functions | |
static DDCTimeUnix | Now () |
Public Attributes | |
time_t | m_t |
|
inline |
default constructor
|
inline |
|
inline |
copy constructor
|
inlinevirtual |
default destructor
|
inlinestatic |
constructor: current time
References Set().
Referenced by ddcLog(), and RmlGetCurrentTime().
|
inline |
set this object to current time
Referenced by DDCTimeHiRes::DDCTimeHiRes(), DDCTimeUnix(), Now(), Set(), and DDCTimeHiRes::Set().
|
inline |
assignment operator (from time_t)
|
inline |
|
inline |
get low-resultion time_t time
References DateTime(), and m_t.
struct tm DDCTimeUnix::CalendarTime | ( | ) | const |
get (low-resolution) calendar time; adapted from old RmlGetCurrentTime()
Referenced by RmlGetCurrentTime().
|
virtual |
get time and date strings in ISO-8601 format (YYYY-MM-DD HH:MM:SS) to char* buffers
DateBuf | output buffer of at least DDCDateBufferSize bytes, or NULL |
TimeBuf | output buffer of at least DDCTimeBufferSize bytes, or NULL |
Reimplemented in DDCTimeHiRes.
References DDCDateBufferSize, and DDCTimeBufferSize.
Referenced by DateStr(), DDCTimeHiRes::DateTime(), ddcLog(), DDCTimeHiRes::Set(), Time(), and TimeStr().
|
inline |
get date string in ISO-8601 format (YYYY-MM-DD)
References DateTime(), and DDCDateBufferSize.
|
inline |
get time string in 24-hour HH:MM:SS format
References DateTime(), DDCTimeBufferSize, and Elapsed().
double DDCTimeUnix::Elapsed | ( | const DDCTimeUnix & | t0 | ) | const |
get elapsed time since t0, double resolution
References m_t.
Referenced by DDCTimeHiRes::Set(), and TimeStr().
time_t DDCTimeUnix::m_t |
time value (low-resolution: 1 second)
Referenced by DDCTimeHiRes::DDCTimeHiRes(), Elapsed(), Set(), DDCTimeHiRes::Set(), Time(), and DDCTimeAvg::Time().