This class is to provide a consistant interface and storage to clock time More...
#include "time_clock.h"
Public Member Functions | |
Time_Clock (const timeval &in_mytime) | |
Time_Clock (time_t time) | |
The Constructor that take a time_t objext. More... | |
Time_Clock (long secs, long usecs) | |
Constructor that takes in sec and usecs. More... | |
Time_Clock (int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, long microseconds=0, int nDST=-1) | |
Construction from parts. More... | |
Time_Clock (const Time_Clock &timeSrc) | |
yet another constructor More... | |
std::string | Format (const char *pFormat) const |
Used to allow access to the "C" library strftime functions. More... | |
std::string | FormatGmt (const char *pFormat) const |
A Wraper to size_t strftime( char *strDest, size_t maxsize, const char *format, const struct tm *timeptr );. More... | |
int | GetDay () const |
int | GetDayOfWeek () const |
struct tm * | GetGmtTm (struct tm *ptm) const |
Access the stored time and converts to a struct tm format If storage location is specified then it will stor information in the provided buffer else it will use the library's internal buffer space. More... | |
int | GetHour () const |
struct tm * | GetLocalTm (struct tm *ptm) const |
Gets The local time in a tm structre from the internal time value. More... | |
int | GetMinute () const |
int | GetMonth () const |
int | GetSecond () const |
time_t | GetTime () const |
time_t | GetTime_t () |
const timeval & | GetTval () |
const timeval & | GetTval () const |
long | GetUsecPart () |
int | GetYear () const |
bool | operator!= (const Time_Clock &time) const |
.is time != More... | |
const Time_Clock & | operator+= (const Time_Span &Time_Span) |
const Time_Clock & | operator-= (const Time_Span &Time_Span) |
bool | operator< (const Time_Clock &time) const |
bool | operator<= (const Time_Clock &time) const |
const Time_Clock & | operator= (const Time_Clock &timeSrc) |
const Time_Clock & | operator= (time_t t) |
bool | operator== (const Time_Clock &time) const |
bool | operator> (const Time_Clock &time) const |
bool | operator>= (const Time_Clock &time) const |
void | Set (int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, long microseconds=0, int nDST=-1) |
void | ToCurrentTime () |
Load this object with the current OS time. More... | |
Static Public Member Functions | |
static Time_Clock | GetCurrentTime () |
The Default no param constructor. More... | |
Friends | |
class | Time_Span |
This class is to provide a consistant interface and storage to clock time
. Epoch based time to the second
jan-2000 .. rhh changing all time to use sub second timing...
Definition at line 14 of file time_clock.h.
|
inline |
The Constructor that take a time_t objext.
Definition at line 267 of file time_clock.h.
|
inline |
Constructor that takes in sec and usecs.
Definition at line 276 of file time_clock.h.
|
inline |
Construction from parts.
Definition at line 84 of file time_clock.h.
|
inline |
yet another constructor
Definition at line 286 of file time_clock.h.
|
inline |
Used to allow access to the "C" library strftime functions.
Definition at line 182 of file time_clock.h.
References GetLocalTm().
|
inline |
A Wraper to size_t strftime( char *strDest, size_t maxsize, const char *format, const struct tm *timeptr );.
Definition at line 226 of file time_clock.h.
References GetGmtTm().
|
inlinestatic |
The Default no param constructor.
. Will set time to current system time
Definition at line 128 of file time_clock.h.
|
inline |
Access the stored time and converts to a struct tm format If storage location is specified then it will stor information in the provided buffer else it will use the library's internal buffer space.
Definition at line 154 of file time_clock.h.
Referenced by FormatGmt().
|
inline |
Gets The local time in a tm structre from the internal time value.
Definition at line 167 of file time_clock.h.
Referenced by Format().
|
inline |
.is time !=
Definition at line 303 of file time_clock.h.
|
inline |
. is time equal
Definition at line 295 of file time_clock.h.
|
inline |
Load this object with the current OS time.
Definition at line 144 of file time_clock.h.