summaryrefslogtreecommitdiff
path: root/src/common/wall_clock.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2022-07-16 23:14:38 -0700
committerGravatar GitHub2022-07-16 23:14:38 -0700
commit8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a (patch)
tree10fc191d058f7d057cbe41bc875054080774893d /src/common/wall_clock.cpp
parentMerge pull request #8593 from merryhime/ranged-setting-T (diff)
parentguard against div-by-zero (diff)
downloadyuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.tar.gz
yuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.tar.xz
yuzu-8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a.zip
Merge pull request #8543 from BreadFish64/use_tsc_from_caps
common/x64: Use TSC clock rate from CPUID when available
Diffstat (limited to 'src/common/wall_clock.cpp')
-rw-r--r--src/common/wall_clock.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp
index b4fb3a59f..ae07f2811 100644
--- a/src/common/wall_clock.cpp
+++ b/src/common/wall_clock.cpp
@@ -67,7 +67,7 @@ std::unique_ptr<WallClock> CreateBestMatchingClock(u64 emulated_cpu_frequency,
67 const auto& caps = GetCPUCaps(); 67 const auto& caps = GetCPUCaps();
68 u64 rtsc_frequency = 0; 68 u64 rtsc_frequency = 0;
69 if (caps.invariant_tsc) { 69 if (caps.invariant_tsc) {
70 rtsc_frequency = EstimateRDTSCFrequency(); 70 rtsc_frequency = caps.tsc_frequency ? caps.tsc_frequency : EstimateRDTSCFrequency();
71 } 71 }
72 72
73 // Fallback to StandardWallClock if the hardware TSC does not have the precision greater than: 73 // Fallback to StandardWallClock if the hardware TSC does not have the precision greater than: