diff options
Diffstat (limited to 'src/common/x64/native_clock.h')
-rw-r--r-- | src/common/x64/native_clock.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h index 046cea095..38ae7a462 100644 --- a/src/common/x64/native_clock.h +++ b/src/common/x64/native_clock.h @@ -3,7 +3,6 @@ #pragma once -#include <atomic> #include "common/wall_clock.h" namespace Common { @@ -29,12 +28,17 @@ public: private: u64 GetRTSC(); - struct alignas(16) TimePoint { - u64 last_measure{}; - u64 accumulated_ticks{}; + union alignas(16) TimePoint { + TimePoint() : pack{} {} + u128 pack{}; + struct Inner { + u64 last_measure{}; + u64 accumulated_ticks{}; + } inner; }; - std::atomic<TimePoint> time_point; + TimePoint time_point; + // factors u64 clock_rtsc_factor{}; u64 cpu_rtsc_factor{}; |