summaryrefslogtreecommitdiff
path: root/src/common/x64/native_clock.h
diff options
context:
space:
mode:
authorGravatar Levi2021-01-10 22:09:56 -0700
committerGravatar Levi2021-01-10 22:09:56 -0700
commit7a3c884e39fccfbb498b855080bffabc9ce2e7f1 (patch)
tree5056f9406dec188439cb0deb87603498243a9412 /src/common/x64/native_clock.h
parentMore forgetting... duh (diff)
parentMerge pull request #5229 from Morph1984/fullscreen-opt (diff)
downloadyuzu-7a3c884e39fccfbb498b855080bffabc9ce2e7f1.tar.gz
yuzu-7a3c884e39fccfbb498b855080bffabc9ce2e7f1.tar.xz
yuzu-7a3c884e39fccfbb498b855080bffabc9ce2e7f1.zip
Merge remote-tracking branch 'upstream/master' into int-flags
Diffstat (limited to 'src/common/x64/native_clock.h')
-rw-r--r--src/common/x64/native_clock.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h
index 891a3bbfd..6d1e32ac8 100644
--- a/src/common/x64/native_clock.h
+++ b/src/common/x64/native_clock.h
@@ -12,9 +12,10 @@
12namespace Common { 12namespace Common {
13 13
14namespace X64 { 14namespace X64 {
15class NativeClock : public WallClock { 15class NativeClock final : public WallClock {
16public: 16public:
17 NativeClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency, u64 rtsc_frequency); 17 explicit NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_,
18 u64 rtsc_frequency_);
18 19
19 std::chrono::nanoseconds GetTimeNS() override; 20 std::chrono::nanoseconds GetTimeNS() override;
20 21
@@ -34,7 +35,7 @@ private:
34 /// value used to reduce the native clocks accuracy as some apss rely on 35 /// value used to reduce the native clocks accuracy as some apss rely on
35 /// undefined behavior where the level of accuracy in the clock shouldn't 36 /// undefined behavior where the level of accuracy in the clock shouldn't
36 /// be higher. 37 /// be higher.
37 static constexpr u64 inaccuracy_mask = ~(0x400 - 1); 38 static constexpr u64 inaccuracy_mask = ~(UINT64_C(0x400) - 1);
38 39
39 SpinLock rtsc_serialize{}; 40 SpinLock rtsc_serialize{};
40 u64 last_measure{}; 41 u64 last_measure{};