mirror of https://github.com/google/benchmark.git
commit
d60945ac43
|
@ -217,9 +217,9 @@ std::string DateTimeString(bool local) {
|
||||||
std::tm timeinfo;
|
std::tm timeinfo;
|
||||||
std::memset(&timeinfo, 0, sizeof(std::tm));
|
std::memset(&timeinfo, 0, sizeof(std::tm));
|
||||||
if (local) {
|
if (local) {
|
||||||
::localtime_r(&now, &timeinfo);
|
localtime_r(&now, &timeinfo);
|
||||||
} else {
|
} else {
|
||||||
::gmtime_r(&now, &timeinfo);
|
gmtime_r(&now, &timeinfo);
|
||||||
}
|
}
|
||||||
std::size_t written = std::strftime(storage, sizeof(storage), "%F %T", &timeinfo);
|
std::size_t written = std::strftime(storage, sizeof(storage), "%F %T", &timeinfo);
|
||||||
CHECK(written < arraysize(storage));
|
CHECK(written < arraysize(storage));
|
||||||
|
|
Loading…
Reference in New Issue