diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2026-10-24 13:22:24 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-24 13:22:24 -0500 |
| commit | b5f580e6f9b5ba442248ac62a25cb4db246aa69c (patch) | |
| tree | 8c023e05a6351b381c229facf4c738bc613f97e4 /Source/Core | |
| parent | c12121f419c40f99eeb65a9039d9fc95be72e94a (diff) | |
| parent | 5ef181ba4dffd6d3d5de47d90de0c22f02657215 (diff) | |
Merge pull request #14946 from OatmealDome/revert-win-std-chrono
Revert "msvc: use std::chrono for GetLocalTimeSinceJan1970"
Diffstat (limited to 'Source/Core')
| -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. |
