summaryrefslogtreecommitdiff
path: root/src/common/x64
diff options
context:
space:
mode:
authorGravatar Morph2023-03-05 20:54:13 -0500
committerGravatar Morph2023-03-07 21:17:46 -0500
commitd718eab351292e3c4d168738f9cd543044c335bc (patch)
tree1240c005bf4cedc026012c0e5b062134c26cb20b /src/common/x64
parentnative_clock: Use RealTimeClock instead of SteadyClock (diff)
downloadyuzu-d718eab351292e3c4d168738f9cd543044c335bc.tar.gz
yuzu-d718eab351292e3c4d168738f9cd543044c335bc.tar.xz
yuzu-d718eab351292e3c4d168738f9cd543044c335bc.zip
native_clock: Wait for 10 seconds instead of 30
It was experimentally determined to be sufficient.
Diffstat (limited to 'src/common/x64')
-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 3f90343a5..76c66e7ee 100644
--- a/src/common/x64/native_clock.cpp
+++ b/src/common/x64/native_clock.cpp
@@ -72,13 +72,13 @@ NativeClock::NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequen
72 u64 rtsc_frequency_) 72 u64 rtsc_frequency_)
73 : WallClock(emulated_cpu_frequency_, emulated_clock_frequency_, true), rtsc_frequency{ 73 : WallClock(emulated_cpu_frequency_, emulated_clock_frequency_, true), rtsc_frequency{
74 rtsc_frequency_} { 74 rtsc_frequency_} {
75 // Thread to re-adjust the RDTSC frequency after 30 seconds has elapsed. 75 // Thread to re-adjust the RDTSC frequency after 10 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::RealTimeClock::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 10 seconds.
81 if (!Common::StoppableTimedWait(token, std::chrono::seconds{30})) { 81 if (!Common::StoppableTimedWait(token, std::chrono::seconds{10})) {
82 return; 82 return;
83 } 83 }
84 const auto end_time = Common::RealTimeClock::Now(); 84 const auto end_time = Common::RealTimeClock::Now();