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.
◆ buildTimeInfo()
| 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()
Gets current date and time with a subsecond part.
- Parameters
-
- Returns
- string based date time in specified format.
◆ getTimeDifference()
| 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()
| 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.
@detail For unix system it uses gettimeofday(timeval*, timezone*) and for Windows, a seperate implementation is provided
- Parameters
-
| [in,out] | tv | Pointer that gets updated |
◆ parseFormat()
◆ timevalToString()
Converts timeval (struct from ctime) to string using specified format and subsecond precision.
The documentation for this class was generated from the following files: