diff options
author | bunnei <bunneidev@gmail.com> | 2023-06-21 21:12:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 21:12:46 -0700 |
commit | e3122c5b468fd59b7eded5a3a7300643d05616bc (patch) | |
tree | 3fe4c2c0bea83f3bb8849ef8839b9520873d41c2 /src/common/steady_clock.cpp | |
parent | 7eb7d56b1bf96267969a913940ae9e35581ab27a (diff) | |
parent | 3e6d81a00899f7f488bfedd849edb64f927b124d (diff) |
Merge pull request #10086 from Morph1984/coretiming-ng-1mainline-0-1476
core_timing: Use CNTPCT as the guest CPU tick
Diffstat (limited to 'src/common/steady_clock.cpp')
-rw-r--r-- | src/common/steady_clock.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/steady_clock.cpp b/src/common/steady_clock.cpp index 7828591960..9415eed29b 100644 --- a/src/common/steady_clock.cpp +++ b/src/common/steady_clock.cpp @@ -28,13 +28,12 @@ static s64 GetSystemTimeNS() { // GetSystemTimePreciseAsFileTime returns the file time in 100ns units. static constexpr s64 Multiplier = 100; // Convert Windows epoch to Unix epoch. - static constexpr s64 WindowsEpochToUnixEpochNS = 0x19DB1DED53E8000LL; + static constexpr s64 WindowsEpochToUnixEpoch = 0x19DB1DED53E8000LL; FILETIME filetime; GetSystemTimePreciseAsFileTime(&filetime); return Multiplier * ((static_cast<s64>(filetime.dwHighDateTime) << 32) + - static_cast<s64>(filetime.dwLowDateTime)) - - WindowsEpochToUnixEpochNS; + static_cast<s64>(filetime.dwLowDateTime) - WindowsEpochToUnixEpoch); } #endif |