diff options
author | bunnei <bunneidev@gmail.com> | 2022-07-16 23:14:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-16 23:14:38 -0700 |
commit | 8ca8281f4f2d4050ec4eb67db422d5ceb3cabb3a (patch) | |
tree | 10fc191d058f7d057cbe41bc875054080774893d /src/common/wall_clock.cpp | |
parent | 7d66f8339e4243c74c54b43cfbc3e944fbecb3e8 (diff) | |
parent | e71d457af923f373505729fe5a335e6768f6144a (diff) |
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.cpp | 2 |
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, const auto& caps = GetCPUCaps(); u64 rtsc_frequency = 0; if (caps.invariant_tsc) { - rtsc_frequency = EstimateRDTSCFrequency(); + rtsc_frequency = caps.tsc_frequency ? caps.tsc_frequency : EstimateRDTSCFrequency(); } // Fallback to StandardWallClock if the hardware TSC does not have the precision greater than: |