summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/timer.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-04-30 10:15:27 -0400
committerGravatar GitHub2018-04-30 10:15:27 -0400
commitf362cf46eed346db79c15ca195d652dff8c48c21 (patch)
treeed7367dd74a937809d9501b2d848e8e981b538ba /src/core/hle/kernel/timer.cpp
parentMerge pull request #424 from lioncash/string (diff)
parentcore_timing: Namespace all functions and constants in core_timing's header (diff)
downloadyuzu-f362cf46eed346db79c15ca195d652dff8c48c21.tar.gz
yuzu-f362cf46eed346db79c15ca195d652dff8c48c21.tar.xz
yuzu-f362cf46eed346db79c15ca195d652dff8c48c21.zip
Merge pull request #425 from lioncash/namespace
core_timing: Namespace all functions and constants in core_timing's header
Diffstat (limited to 'src/core/hle/kernel/timer.cpp')
-rw-r--r--src/core/hle/kernel/timer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp
index ad58bf043..661356a97 100644
--- a/src/core/hle/kernel/timer.cpp
+++ b/src/core/hle/kernel/timer.cpp
@@ -57,7 +57,8 @@ void Timer::Set(s64 initial, s64 interval) {
57 // Immediately invoke the callback 57 // Immediately invoke the callback
58 Signal(0); 58 Signal(0);
59 } else { 59 } else {
60 CoreTiming::ScheduleEvent(nsToCycles(initial), timer_callback_event_type, callback_handle); 60 CoreTiming::ScheduleEvent(CoreTiming::nsToCycles(initial), timer_callback_event_type,
61 callback_handle);
61 } 62 }
62} 63}
63 64
@@ -86,7 +87,7 @@ void Timer::Signal(int cycles_late) {
86 87
87 if (interval_delay != 0) { 88 if (interval_delay != 0) {
88 // Reschedule the timer with the interval delay 89 // Reschedule the timer with the interval delay
89 CoreTiming::ScheduleEvent(nsToCycles(interval_delay) - cycles_late, 90 CoreTiming::ScheduleEvent(CoreTiming::nsToCycles(interval_delay) - cycles_late,
90 timer_callback_event_type, callback_handle); 91 timer_callback_event_type, callback_handle);
91 } 92 }
92} 93}