From 2e4bf9ef1bf60de18eed91140d188ca84a6c89c0 Mon Sep 17 00:00:00 2001 From: Elad Ashkenazi Date: Sat, 3 Jun 2023 18:36:49 +0300 Subject: [PATCH] Update sys_timer.cpp --- rpcs3/Emu/Cell/lv2/sys_timer.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/rpcs3/Emu/Cell/lv2/sys_timer.cpp b/rpcs3/Emu/Cell/lv2/sys_timer.cpp index 23c94ec290..4816a4ef3f 100644 --- a/rpcs3/Emu/Cell/lv2/sys_timer.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_timer.cpp @@ -144,13 +144,16 @@ void lv2_timer_thread::operator()() for (const auto& timer : timers) { - if (lv2_obj::check(timer)) + while (lv2_obj::check(timer)) { - const u64 advised_sleep_time = timer->check(_now); - - if (sleep_time > advised_sleep_time) + if (const u64 advised_sleep_time = timer->check(_now)) { - sleep_time = advised_sleep_time; + if (sleep_time > advised_sleep_time) + { + sleep_time = advised_sleep_time; + } + + break; } } }