diff options
| author | Fernando S <fsahmkow27@gmail.com> | 2022-06-30 12:38:50 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-30 12:38:50 +0200 |
| commit | ee5d112e192ddbbedf066dfd6554914231aa278e (patch) | |
| tree | 8b6b2f943bbf2fc749dbe144eee26cd144c084c9 /src/common/x64/native_clock.cpp | |
| parent | 801409b5ac28f3d4b5db2da14017fa8ad0025e13 (diff) | |
| parent | 3adeb694b0f55b97701e9233255460300c2ebad0 (diff) | |
Merge pull request #7454 from FernandoS27/new-core-timing
Core: Remake Core Timing
Diffstat (limited to 'src/common/x64/native_clock.cpp')
| -rw-r--r-- | src/common/x64/native_clock.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp index 1b71945037..6aaa8cdf99 100644 --- a/src/common/x64/native_clock.cpp +++ b/src/common/x64/native_clock.cpp @@ -75,8 +75,8 @@ NativeClock::NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequen } u64 NativeClock::GetRTSC() { - TimePoint new_time_point{}; TimePoint current_time_point{}; + TimePoint new_time_point{}; current_time_point.pack = Common::AtomicLoad128(time_point.pack.data()); do { @@ -89,8 +89,7 @@ u64 NativeClock::GetRTSC() { new_time_point.inner.accumulated_ticks = current_time_point.inner.accumulated_ticks + diff; } while (!Common::AtomicCompareAndSwap(time_point.pack.data(), new_time_point.pack, current_time_point.pack, current_time_point.pack)); - /// The clock cannot be more precise than the guest timer, remove the lower bits - return new_time_point.inner.accumulated_ticks & inaccuracy_mask; + return new_time_point.inner.accumulated_ticks; } void NativeClock::Pause(bool is_paused) { |
