diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-05-29 00:35:51 +0100 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-07-02 23:09:48 +0100 |
commit | 6f7cb69c94bef0795f054d881e061745f69d1eda (patch) | |
tree | cc0bec2fed92a5645886dde773add00c84d8b9f4 /src/core/core_timing.cpp | |
parent | 95ceae40e6f4806a1bf00913315ed22bd2842854 (diff) |
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.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index e6112a3c9a..b98a0cb335 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_) { -> std::optional<std::chrono::nanoseconds> { return std::nullopt; }; ev_lost = CreateEvent("_lost_event", empty_timed_callback); if (is_multicore) { - timer_thread = std::make_unique<std::thread>(ThreadEntry, std::ref(*this)); + timer_thread = std::make_unique<std::jthread>(ThreadEntry, std::ref(*this)); } } @@ -255,7 +255,6 @@ void CoreTiming::ThreadLoop() { #ifdef _WIN32 while (!paused && !event.IsSet() && wait_time > 0) { wait_time = *next_time - GetGlobalTimeNs().count(); - if (wait_time >= timer_resolution_ns) { Common::Windows::SleepForOneTick(); } else { |