summaryrefslogtreecommitdiffstats
path: root/src/common/x64/native_clock.h
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2022-06-28 22:42:00 +0200
committerFernando Sahmkow <fsahmkow27@gmail.com>2022-06-28 22:42:00 +0200
commit2575a93dc6d15bb4c60c18be1635b48f37355059 (patch)
treee676365703fbfa5bfd3fdc1e003372af6e8feef7 /src/common/x64/native_clock.h
parentNative Clock: remove inaccuracy mask. (diff)
downloadyuzu-2575a93dc6d15bb4c60c18be1635b48f37355059.tar
yuzu-2575a93dc6d15bb4c60c18be1635b48f37355059.tar.gz
yuzu-2575a93dc6d15bb4c60c18be1635b48f37355059.tar.bz2
yuzu-2575a93dc6d15bb4c60c18be1635b48f37355059.tar.lz
yuzu-2575a93dc6d15bb4c60c18be1635b48f37355059.tar.xz
yuzu-2575a93dc6d15bb4c60c18be1635b48f37355059.tar.zst
yuzu-2575a93dc6d15bb4c60c18be1635b48f37355059.zip
Diffstat (limited to '')
-rw-r--r--src/common/x64/native_clock.h14
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{};