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 1202 of file easylogging++.h.
◆ buildTimeInfo()
| static struct ::tm* el::base::utils::DateTime::buildTimeInfo |
( |
struct timeval * |
currTime, |
|
|
struct ::tm * |
timeInfo |
|
) |
| |
|
static |
◆ formatTime()
Formats time to get unit accordingly, units like second if > 1000 or minutes if > 60000 etc.
◆ getDateTime()
| static std::string el::base::utils::DateTime::getDateTime |
( |
const char * |
format, |
|
|
const base::SubsecondPrecision * |
ssPrec |
|
) |
| |
|
static |
Gets current date and time with a subsecond part.
- Parameters
-
- Returns
- string based date time in specified format.
◆ getTimeDifference()
| static unsigned long long el::base::utils::DateTime::getTimeDifference |
( |
const struct timeval & |
endTime, |
|
|
const struct timeval & |
startTime, |
|
|
base::TimestampUnit |
timestampUnit |
|
) |
| |
|
static |
Gets time difference in milli/micro second depending on timestampUnit.
◆ gettimeofday()
| static void el::base::utils::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 |
◆ timevalToString()
| static std::string el::base::utils::DateTime::timevalToString |
( |
struct timeval |
tval, |
|
|
const char * |
format, |
|
|
const el::base::SubsecondPrecision * |
ssPrec |
|
) |
| |
|
static |
Converts timeval (struct from ctime) to string using specified format and subsecond precision.
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/electroneum-5.0.0.4/external/easylogging++/easylogging++.h