diff options
Diffstat (limited to 'src/common/x64/native_clock.h')
-rw-r--r-- | src/common/x64/native_clock.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h index b58cf9f5a..891a3bbfd 100644 --- a/src/common/x64/native_clock.h +++ b/src/common/x64/native_clock.h @@ -26,9 +26,16 @@ public: u64 GetCPUCycles() override; + void Pause(bool is_paused) override; + private: u64 GetRTSC(); + /// value used to reduce the native clocks accuracy as some apss rely on + /// undefined behavior where the level of accuracy in the clock shouldn't + /// be higher. + static constexpr u64 inaccuracy_mask = ~(0x400 - 1); + SpinLock rtsc_serialize{}; u64 last_measure{}; u64 accumulated_ticks{}; |