summaryrefslogtreecommitdiff
path: root/src/common/x64/native_clock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/x64/native_clock.cpp')
-rw-r--r--src/common/x64/native_clock.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp
index c11590291..3f90343a5 100644
--- a/src/common/x64/native_clock.cpp
+++ b/src/common/x64/native_clock.cpp
@@ -53,11 +53,11 @@ u64 EstimateRDTSCFrequency() {
53 FencedRDTSC(); 53 FencedRDTSC();
54 54
55 // Get the current time. 55 // Get the current time.
56 const auto start_time = Common::SteadyClock::Now(); 56 const auto start_time = Common::RealTimeClock::Now();
57 const u64 tsc_start = FencedRDTSC(); 57 const u64 tsc_start = FencedRDTSC();
58 // Wait for 250 milliseconds. 58 // Wait for 250 milliseconds.
59 std::this_thread::sleep_for(std::chrono::milliseconds{250}); 59 std::this_thread::sleep_for(std::chrono::milliseconds{250});
60 const auto end_time = Common::SteadyClock::Now(); 60 const auto end_time = Common::RealTimeClock::Now();
61 const u64 tsc_end = FencedRDTSC(); 61 const u64 tsc_end = FencedRDTSC();
62 // Calculate differences. 62 // Calculate differences.
63 const u64 timer_diff = static_cast<u64>( 63 const u64 timer_diff = static_cast<u64>(
@@ -75,13 +75,13 @@ NativeClock::NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequen
75 // Thread to re-adjust the RDTSC frequency after 30 seconds has elapsed. 75 // Thread to re-adjust the RDTSC frequency after 30 seconds has elapsed.
76 time_sync_thread = std::jthread{[this](std::stop_token token) { 76 time_sync_thread = std::jthread{[this](std::stop_token token) {
77 // Get the current time. 77 // Get the current time.
78 const auto start_time = Common::SteadyClock::Now(); 78 const auto start_time = Common::RealTimeClock::Now();
79 const u64 tsc_start = FencedRDTSC(); 79 const u64 tsc_start = FencedRDTSC();
80 // Wait for 30 seconds. 80 // Wait for 30 seconds.
81 if (!Common::StoppableTimedWait(token, std::chrono::seconds{30})) { 81 if (!Common::StoppableTimedWait(token, std::chrono::seconds{30})) {
82 return; 82 return;
83 } 83 }
84 const auto end_time = Common::SteadyClock::Now(); 84 const auto end_time = Common::RealTimeClock::Now();
85 const u64 tsc_end = FencedRDTSC(); 85 const u64 tsc_end = FencedRDTSC();
86 // Calculate differences. 86 // Calculate differences.
87 const u64 timer_diff = static_cast<u64>( 87 const u64 timer_diff = static_cast<u64>(