diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-07-02 21:05:35 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-07-02 21:08:04 +0200 |
commit | c3fbc8d2fe2ff423d774ed3886fc8391c730f637 (patch) | |
tree | f069809e0b2c5f033b016b267705e507a970ae88 /src/core/core_timing.cpp | |
parent | Merge pull request #10949 from t895/memory-requirements (diff) | |
download | yuzu-c3fbc8d2fe2ff423d774ed3886fc8391c730f637.tar yuzu-c3fbc8d2fe2ff423d774ed3886fc8391c730f637.tar.gz yuzu-c3fbc8d2fe2ff423d774ed3886fc8391c730f637.tar.bz2 yuzu-c3fbc8d2fe2ff423d774ed3886fc8391c730f637.tar.lz yuzu-c3fbc8d2fe2ff423d774ed3886fc8391c730f637.tar.xz yuzu-c3fbc8d2fe2ff423d774ed3886fc8391c730f637.tar.zst yuzu-c3fbc8d2fe2ff423d774ed3886fc8391c730f637.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 |