GClasses

GClasses::GTime Class Reference

Provides some time-related functions. More...

#include <GTime.h>

List of all members.

Static Public Member Functions

static double seconds ()
 Returns the number of seconds since "time X" with at least millisecond precision. On Linux, "time X" is the Epoch (midnight, Jan 1, 1970, GMT). On Windows, "time X" is the time when the system was started.
static const char * asciiTime (char *szBuf, int nSize, bool bGreenwichMeanTime=false)
 Returns a string representation of the current time.
static void appendTimeStampValue (std::string *pS, const char *sep1="-", const char *sep2=" ", const char *sep3=":", bool bGreenwichMeanTime=false)
 Adds a string representation of the current time to pS in big Endian format. For example, if sep1="-", sep2=" ", and sep3=":", and the time is one second before 2010, then it would append a string like this to pS: "2009-12-31 23:59:59". If the separators are all "", then it would append "20091231235959".

Detailed Description

Provides some time-related functions.


Member Function Documentation

static void GClasses::GTime::appendTimeStampValue ( std::string *  pS,
const char *  sep1 = "-",
const char *  sep2 = " ",
const char *  sep3 = ":",
bool  bGreenwichMeanTime = false 
) [static]

Adds a string representation of the current time to pS in big Endian format. For example, if sep1="-", sep2=" ", and sep3=":", and the time is one second before 2010, then it would append a string like this to pS: "2009-12-31 23:59:59". If the separators are all "", then it would append "20091231235959".

static const char* GClasses::GTime::asciiTime ( char *  szBuf,
int  nSize,
bool  bGreenwichMeanTime = false 
) [static]

Returns a string representation of the current time.

static double GClasses::GTime::seconds ( ) [static]

Returns the number of seconds since "time X" with at least millisecond precision. On Linux, "time X" is the Epoch (midnight, Jan 1, 1970, GMT). On Windows, "time X" is the time when the system was started.