summaryrefslogtreecommitdiff
path: root/src/common/wall_clock.cpp
diff options
context:
space:
mode:
authorGravatar Morph2022-01-30 12:36:56 -0500
committerGravatar Morph2022-01-30 12:36:56 -0500
commit4e766280c4481d23a64a1c80c0ec40d7cf1ff378 (patch)
tree85f078d686978b4b27fc44c7cf0b95a90a6cc4bf /src/common/wall_clock.cpp
parentMerge pull request #7791 from german77/wall_clock (diff)
downloadyuzu-4e766280c4481d23a64a1c80c0ec40d7cf1ff378.tar.gz
yuzu-4e766280c4481d23a64a1c80c0ec40d7cf1ff378.tar.xz
yuzu-4e766280c4481d23a64a1c80c0ec40d7cf1ff378.zip
common: wall_clock: Utilize constants for ms, us, and ns ratios
Diffstat (limited to '')
-rw-r--r--src/common/wall_clock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp
index ffa282e88..081e0562f 100644
--- a/src/common/wall_clock.cpp
+++ b/src/common/wall_clock.cpp
@@ -73,8 +73,8 @@ std::unique_ptr<WallClock> CreateBestMatchingClock(u32 emulated_cpu_frequency,
73 rtsc_frequency = EstimateRDTSCFrequency(); 73 rtsc_frequency = EstimateRDTSCFrequency();
74 } 74 }
75 75
76 // Fallback to StandardWallClock if rtsc period is higher than a nano second 76 // Fallback to StandardWallClock if the hardware TSC does not have nanosecond precision.
77 if (rtsc_frequency <= 1000000000) { 77 if (rtsc_frequency <= WallClock::NS_RATIO) {
78 return std::make_unique<StandardWallClock>(emulated_cpu_frequency, 78 return std::make_unique<StandardWallClock>(emulated_cpu_frequency,
79 emulated_clock_frequency); 79 emulated_clock_frequency);
80 } else { 80 } else {