summaryrefslogtreecommitdiffstats
path: root/src/common/x64/native_clock.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-12-02 20:20:43 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-12-02 20:20:43 +0100
commit762b8ad448369cc770beae4d8368a6258b13709e (patch)
treecff2c5d404b77e93e875fbf40cf78ea6d30d32b0 /src/common/x64/native_clock.cpp
parentMerge pull request #7483 from zhaobot/tx-update-20211201022129 (diff)
downloadyuzu-762b8ad448369cc770beae4d8368a6258b13709e.tar
yuzu-762b8ad448369cc770beae4d8368a6258b13709e.tar.gz
yuzu-762b8ad448369cc770beae4d8368a6258b13709e.tar.bz2
yuzu-762b8ad448369cc770beae4d8368a6258b13709e.tar.lz
yuzu-762b8ad448369cc770beae4d8368a6258b13709e.tar.xz
yuzu-762b8ad448369cc770beae4d8368a6258b13709e.tar.zst
yuzu-762b8ad448369cc770beae4d8368a6258b13709e.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