Contains utilities for cross-platform date/time. This class make use of el::base::utils::Str.
More...
#include <easylogging++.h>
Contains utilities for cross-platform date/time. This class make use of el::base::utils::Str.
Definition at line 1172 of file easylogging++.h.
struct::tm * DateTime::buildTimeInfo |
( |
struct timeval * |
currTime, |
|
|
struct::tm * |
timeInfo |
|
) |
| |
|
static |
Formats time to get unit accordingly, units like second if > 1000 or minutes if > 60000 etc.
Definition at line 1215 of file easylogging++.cc.
Gets current date and time with a subsecond part.
- Parameters
-
- Returns
- string based date time in specified format.
Definition at line 1198 of file easylogging++.cc.
unsigned long long DateTime::getTimeDifference |
( |
const struct timeval & |
endTime, |
|
|
const struct timeval & |
startTime, |
|
|
base::TimestampUnit |
timestampUnit |
|
) |
| |
|
static |
Gets time difference in milli/micro second depending on timestampUnit.
Definition at line 1233 of file easylogging++.cc.
void DateTime::gettimeofday |
( |
struct timeval * |
tv | ) |
|
|
static |
Cross platform gettimeofday for Windows and unix platform. This can be used to determine current microsecond.
For unix system it uses gettimeofday(timeval*, timezone*) and for Windows, a seperate implementation is provided
- Parameters
-
[in,out] | tv | Pointer that gets updated |
Definition at line 1171 of file easylogging++.cc.
char * DateTime::parseFormat |
( |
char * |
buf, |
|
|
std::size_t |
bufSz, |
|
|
const char * |
format, |
|
|
const struct tm * |
tInfo, |
|
|
std::size_t |
msec, |
|
|
const base::SubsecondPrecision * |
ssPrec |
|
) |
| |
|
staticprivate |
Converts timeval (struct from ctime) to string using specified format and subsecond precision.
Definition at line 1204 of file easylogging++.cc.
The documentation for this class was generated from the following files: