diff --git a/uppsrc/ide/Core/Logger.cpp b/uppsrc/ide/Core/Logger.cpp index 91e0e24d9..afe9b639f 100644 --- a/uppsrc/ide/Core/Logger.cpp +++ b/uppsrc/ide/Core/Logger.cpp @@ -1,5 +1,7 @@ #include "Logger.h" +#include + using namespace Upp; Logger::Logger(LoggingLevel level, const String& tag) @@ -34,8 +36,18 @@ void Logger::Log() String Logger::GetCurrentTime() { - Time tm = GetSysTime(); - return Format("%02d:%02d:%02d", (int)tm.hour, (int)tm.minute, (int)tm.second); + using namespace std::chrono; + using days = duration>::type>; + + auto tp = system_clock::now().time_since_epoch(); + + auto d = duration_cast(tp); tp -= d; + auto h = duration_cast(tp); tp -= h; + auto m = duration_cast(tp); tp -= m; + auto s = duration_cast(tp); tp -= s; + auto ms = duration_cast(tp); + + return Format("%02d:%02d:%02d:%03d", (int)h.count(), (int)m.count(), (int)s.count(), (int)ms.count()); } Stream& Upp::operator<<(Stream& s, Logger::LoggingLevel level)