summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Timer.cpp
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2022-08-06 22:22:14 -0700
committerShawn Hoffman <godisgovernment@gmail.com>2022-08-06 22:22:14 -0700
commit292724b2280da23a2cebd5682d504a113bc45c83 (patch)
treeb56a5384ae7bed0702a3e12f55e9f8dd64356b52 /Source/Core/Common/Timer.cpp
parent7b2b559743f09d2b087728d7eb0c14c6b81a9f2a (diff)
Revert "msvc: use std::chrono for GetLocalTimeSinceJan1970"
This reverts commit 86da6c98fbd229d87de7cf8b9c7eb94c16923829.
Diffstat (limited to 'Source/Core/Common/Timer.cpp')
-rw-r--r--Source/Core/Common/Timer.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/Core/Common/Timer.cpp b/Source/Core/Common/Timer.cpp
index fb81164390..5e4af1ef45 100644
--- a/Source/Core/Common/Timer.cpp
+++ b/Source/Core/Common/Timer.cpp
@@ -7,6 +7,7 @@
#ifdef _WIN32
#include <Windows.h>
+#include <ctime>
#include <timeapi.h>
#else
#include <sys/time.h>
@@ -67,12 +68,6 @@ u64 Timer::ElapsedMs() const
u64 Timer::GetLocalTimeSinceJan1970()
{
-#ifdef _MSC_VER
- std::chrono::zoned_seconds seconds(
- std::chrono::current_zone(),
- std::chrono::time_point_cast<std::chrono::seconds>(std::chrono::system_clock::now()));
- return seconds.get_local_time().time_since_epoch().count();
-#else
time_t sysTime, tzDiff, tzDST;
time(&sysTime);
tm* gmTime = localtime(&sysTime);
@@ -88,7 +83,6 @@ u64 Timer::GetLocalTimeSinceJan1970()
tzDiff = sysTime - mktime(gmTime);
return static_cast<u64>(sysTime + tzDiff + tzDST);
-#endif
}
void Timer::IncreaseResolution()