summaryrefslogtreecommitdiffstats
path: root/src/common/x64/native_clock.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-12-04 01:08:20 +0100
committerGitHub <noreply@github.com>2021-12-04 01:08:20 +0100
commita2fb5a13b2b00922d1f4fcc6dc41849704fa0f89 (patch)
tree8feb52b4bd0afa965b0865ef00e5f8739b07d3df /src/common/x64/native_clock.cpp
parentMerge pull request #7490 from Morph1984/stub-album-save-screenshot (diff)
parentgeneral: Replace high_resolution_clock with steady_clock (diff)
downloadyuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.tar
yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.tar.gz
yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.tar.bz2
yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.tar.lz
yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.tar.xz
yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.tar.zst
yuzu-a2fb5a13b2b00922d1f4fcc6dc41849704fa0f89.zip
Diffstat (limited to '')
-rw-r--r--src/common/x64/native_clock.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp
index 87de40624..28f834443 100644
--- a/src/common/x64/native_clock.cpp
+++ b/src/common/x64/native_clock.cpp
@@ -19,16 +19,16 @@ u64 EstimateRDTSCFrequency() {
// get current time
_mm_mfence();
const u64 tscStart = __rdtsc();
- const auto startTime = std::chrono::high_resolution_clock::now();
+ const auto startTime = std::chrono::steady_clock::now();
// wait roughly 3 seconds
while (true) {
auto milli = std::chrono::duration_cast<std::chrono::milliseconds>(
- std::chrono::high_resolution_clock::now() - startTime);
+ std::chrono::steady_clock::now() - startTime);
if (milli.count() >= 3000)
break;
std::this_thread::sleep_for(milli_10);
}
- const auto endTime = std::chrono::high_resolution_clock::now();
+ const auto endTime = std::chrono::steady_clock::now();
_mm_mfence();
const u64 tscEnd = __rdtsc();
// calculate difference