summaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
authorGravatar liamwhite2023-07-02 17:38:28 -0400
committerGravatar GitHub2023-07-02 17:38:28 -0400
commit95ceae40e6f4806a1bf00913315ed22bd2842854 (patch)
treee1054aaadcfd0db9904835a3bf6ab80bf37d673c /src/core/core_timing.cpp
parentMerge pull request #10479 from GPUCode/format-list (diff)
parentcore_timing: Remove GetCurrentTimerResolution in CoreTiming loop (diff)
downloadyuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.gz
yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.xz
yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.zip
Merge pull request #10998 from Morph1984/qt-stop-messing-with-me
core_timing: Remove GetCurrentTimerResolution in CoreTiming loop
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index 4f0a3f8ea..e6112a3c9 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -253,9 +253,6 @@ void CoreTiming::ThreadLoop() {
253 auto wait_time = *next_time - GetGlobalTimeNs().count(); 253 auto wait_time = *next_time - GetGlobalTimeNs().count();
254 if (wait_time > 0) { 254 if (wait_time > 0) {
255#ifdef _WIN32 255#ifdef _WIN32
256 const auto timer_resolution_ns =
257 Common::Windows::GetCurrentTimerResolution().count();
258
259 while (!paused && !event.IsSet() && wait_time > 0) { 256 while (!paused && !event.IsSet() && wait_time > 0) {
260 wait_time = *next_time - GetGlobalTimeNs().count(); 257 wait_time = *next_time - GetGlobalTimeNs().count();
261 258
@@ -316,4 +313,10 @@ std::chrono::microseconds CoreTiming::GetGlobalTimeUs() const {
316 return std::chrono::microseconds{Common::WallClock::CPUTickToUS(cpu_ticks)}; 313 return std::chrono::microseconds{Common::WallClock::CPUTickToUS(cpu_ticks)};
317} 314}
318 315
316#ifdef _WIN32
317void CoreTiming::SetTimerResolutionNs(std::chrono::nanoseconds ns) {
318 timer_resolution_ns = ns.count();
319}
320#endif
321
319} // namespace Core::Timing 322} // namespace Core::Timing