diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-07-02 23:38:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-02 23:38:28 +0200 |
commit | 95ceae40e6f4806a1bf00913315ed22bd2842854 (patch) | |
tree | e1054aaadcfd0db9904835a3bf6ab80bf37d673c /src/core/core_timing.cpp | |
parent | Merge pull request #10479 from GPUCode/format-list (diff) | |
parent | core_timing: Remove GetCurrentTimerResolution in CoreTiming loop (diff) | |
download | yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.gz yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.bz2 yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.lz yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.xz yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.tar.zst yuzu-95ceae40e6f4806a1bf00913315ed22bd2842854.zip |
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r-- | src/core/core_timing.cpp | 9 |
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() { auto wait_time = *next_time - GetGlobalTimeNs().count(); if (wait_time > 0) { #ifdef _WIN32 - const auto timer_resolution_ns = - Common::Windows::GetCurrentTimerResolution().count(); - while (!paused && !event.IsSet() && wait_time > 0) { wait_time = *next_time - GetGlobalTimeNs().count(); @@ -316,4 +313,10 @@ std::chrono::microseconds CoreTiming::GetGlobalTimeUs() const { return std::chrono::microseconds{Common::WallClock::CPUTickToUS(cpu_ticks)}; } +#ifdef _WIN32 +void CoreTiming::SetTimerResolutionNs(std::chrono::nanoseconds ns) { + timer_resolution_ns = ns.count(); +} +#endif + } // namespace Core::Timing |