summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/core_timing.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index 12e9e60a4..b02119494 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -136,8 +136,11 @@ void CoreTiming::AddTicks(u64 ticks) {
136 136
137void CoreTiming::Idle() { 137void CoreTiming::Idle() {
138 if (!event_queue.empty()) { 138 if (!event_queue.empty()) {
139 u64 next_event_time = event_queue.front().time; 139 const u64 next_event_time = event_queue.front().time;
140 ticks = nsToCycles(std::chrono::nanoseconds(next_event_time)) + 10U; 140 const u64 next_ticks = nsToCycles(std::chrono::nanoseconds(next_event_time)) + 10U;
141 if (next_ticks > ticks) {
142 ticks = next_ticks;
143 }
141 return; 144 return;
142 } 145 }
143 ticks += 1000U; 146 ticks += 1000U;