diff options
| author | OatmealDome <julian@oatmealdome.me> | 2026-10-23 11:49:22 -0400 |
|---|---|---|
| committer | OatmealDome <julian@oatmealdome.me> | 2026-10-23 11:49:22 -0400 |
| commit | 5ef181ba4dffd6d3d5de47d90de0c22f02657215 (patch) | |
| tree | 045b9055f7a5f97efed1a123a871ee3a08ed4dac /Source/Core/Common | |
| parent | e1d35f666cc35f6ead55d32ea2679df44d04da72 (diff) | |
Revert "msvc: use std::chrono for GetLocalTimeSinceJan1970"
This reverts commit 86da6c98fbd229d87de7cf8b9c7eb94c16923829.
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Timer.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/Core/Common/Timer.cpp b/Source/Core/Common/Timer.cpp index fcbbd7bbd2..cd98bb3e94 100644 --- a/Source/Core/Common/Timer.cpp +++ b/Source/Core/Common/Timer.cpp @@ -9,6 +9,7 @@ #ifdef _WIN32 #include <windows.h> +#include <ctime> #include <timeapi.h> #endif @@ -68,12 +69,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); @@ -89,7 +84,6 @@ u64 Timer::GetLocalTimeSinceJan1970() tzDiff = sysTime - mktime(gmTime); return static_cast<u64>(sysTime + tzDiff + tzDST); -#endif } // This is requested by Timer::IncreaseResolution on Windows. |
