summaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
diff options
context:
space:
mode:
authorGravatar Kelebek12023-05-29 00:35:51 +0100
committerGravatar Kelebek12023-07-02 23:09:48 +0100
commit6f7cb69c94bef0795f054d881e061745f69d1eda (patch)
treecc0bec2fed92a5645886dde773add00c84d8b9f4 /src/core/core_timing.cpp
parentMerge pull request #10998 from Morph1984/qt-stop-messing-with-me (diff)
downloadyuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.tar.gz
yuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.tar.xz
yuzu-6f7cb69c94bef0795f054d881e061745f69d1eda.zip
Use spans over guest memory where possible instead of copying data.
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r--src/core/core_timing.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index e6112a3c9..b98a0cb33 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -70,7 +70,7 @@ void CoreTiming::Initialize(std::function<void()>&& on_thread_init_) {
70 -> std::optional<std::chrono::nanoseconds> { return std::nullopt; }; 70 -> std::optional<std::chrono::nanoseconds> { return std::nullopt; };
71 ev_lost = CreateEvent("_lost_event", empty_timed_callback); 71 ev_lost = CreateEvent("_lost_event", empty_timed_callback);
72 if (is_multicore) { 72 if (is_multicore) {
73 timer_thread = std::make_unique<std::thread>(ThreadEntry, std::ref(*this)); 73 timer_thread = std::make_unique<std::jthread>(ThreadEntry, std::ref(*this));
74 } 74 }
75} 75}
76 76
@@ -255,7 +255,6 @@ void CoreTiming::ThreadLoop() {
255#ifdef _WIN32 255#ifdef _WIN32
256 while (!paused && !event.IsSet() && wait_time > 0) { 256 while (!paused && !event.IsSet() && wait_time > 0) {
257 wait_time = *next_time - GetGlobalTimeNs().count(); 257 wait_time = *next_time - GetGlobalTimeNs().count();
258
259 if (wait_time >= timer_resolution_ns) { 258 if (wait_time >= timer_resolution_ns) {
260 Common::Windows::SleepForOneTick(); 259 Common::Windows::SleepForOneTick();
261 } else { 260 } else {