diff options
author | bunnei <bunneidev@gmail.com> | 2023-06-21 21:12:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 21:12:46 -0700 |
commit | e3122c5b468fd59b7eded5a3a7300643d05616bc (patch) | |
tree | 3fe4c2c0bea83f3bb8849ef8839b9520873d41c2 /src/common/x64/cpu_detect.cpp | |
parent | 7eb7d56b1bf96267969a913940ae9e35581ab27a (diff) | |
parent | 3e6d81a00899f7f488bfedd849edb64f927b124d (diff) |
Merge pull request #10086 from Morph1984/coretiming-ng-1mainline-0-1476
core_timing: Use CNTPCT as the guest CPU tick
Diffstat (limited to 'src/common/x64/cpu_detect.cpp')
-rw-r--r-- | src/common/x64/cpu_detect.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index 72ed6e96c9..c998b1197e 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp @@ -14,6 +14,7 @@ #include "common/common_types.h" #include "common/logging/log.h" #include "common/x64/cpu_detect.h" +#include "common/x64/rdtsc.h" #ifdef _WIN32 #include <windows.h> @@ -187,6 +188,8 @@ static CPUCaps Detect() { caps.tsc_frequency = static_cast<u64>(caps.crystal_frequency) * caps.tsc_crystal_ratio_numerator / caps.tsc_crystal_ratio_denominator; + } else { + caps.tsc_frequency = X64::EstimateRDTSCFrequency(); } } |