diff options
Diffstat (limited to 'src/common/x64/native_clock.cpp')
| -rw-r--r-- | src/common/x64/native_clock.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp index 347e41efc..2a2664e5d 100644 --- a/src/common/x64/native_clock.cpp +++ b/src/common/x64/native_clock.cpp | |||
| @@ -56,7 +56,7 @@ u64 NativeClock::GetRTSC() { | |||
| 56 | TimePoint new_time_point{}; | 56 | TimePoint new_time_point{}; |
| 57 | TimePoint current_time_point{}; | 57 | TimePoint current_time_point{}; |
| 58 | do { | 58 | do { |
| 59 | current_time_point.pack = time_point.pack; | 59 | current_time_point.pack = Common::AtomicLoad128(time_point.pack.data()); |
| 60 | _mm_mfence(); | 60 | _mm_mfence(); |
| 61 | const u64 current_measure = __rdtsc(); | 61 | const u64 current_measure = __rdtsc(); |
| 62 | u64 diff = current_measure - current_time_point.inner.last_measure; | 62 | u64 diff = current_measure - current_time_point.inner.last_measure; |
| @@ -76,7 +76,7 @@ void NativeClock::Pause(bool is_paused) { | |||
| 76 | TimePoint current_time_point{}; | 76 | TimePoint current_time_point{}; |
| 77 | TimePoint new_time_point{}; | 77 | TimePoint new_time_point{}; |
| 78 | do { | 78 | do { |
| 79 | current_time_point.pack = time_point.pack; | 79 | current_time_point.pack = Common::AtomicLoad128(time_point.pack.data()); |
| 80 | new_time_point.pack = current_time_point.pack; | 80 | new_time_point.pack = current_time_point.pack; |
| 81 | _mm_mfence(); | 81 | _mm_mfence(); |
| 82 | new_time_point.inner.last_measure = __rdtsc(); | 82 | new_time_point.inner.last_measure = __rdtsc(); |