MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / GetTimestampString

Function GetTimestampString

TombEngine/Game/debug/debug.cpp:15–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 static auto prevString = std::string();
14
15 static std::string GetTimestampString()
16 {
17 auto now = std::chrono::system_clock::now();
18 auto t = std::chrono::system_clock::to_time_t(now);
19
20 std::tm tmBuf{};
21 localtime_s(&tmBuf, &t);
22
23 std::ostringstream oss;
24 oss << std::put_time(&tmBuf, "%Y-%m-%d_%H-%M-%S");
25 return oss.str();
26 }
27
28 static void CleanupOldLogs(const std::filesystem::path& logDir)
29 {

Callers 1

InitTENLogFunction · 0.85

Calls 2

localtime_sFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected