diff options
author | B3n30 <bene_thomas@web.de> | 2017-11-25 14:56:57 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-01-09 01:10:25 +0100 |
commit | 82151d407d8021fa8865cf8dd51c4d5cf0a4b702 (patch) | |
tree | 739df280fddbecb50e1a2fa690abe8749486ea2d /src/core/hle/kernel/timer.cpp | |
parent | IPC: Make DuplicateSession return the Domain instead of the Session if the request was made on a Domain interface. (diff) | |
download | yuzu-82151d407d8021fa8865cf8dd51c4d5cf0a4b702.tar yuzu-82151d407d8021fa8865cf8dd51c4d5cf0a4b702.tar.gz yuzu-82151d407d8021fa8865cf8dd51c4d5cf0a4b702.tar.bz2 yuzu-82151d407d8021fa8865cf8dd51c4d5cf0a4b702.tar.lz yuzu-82151d407d8021fa8865cf8dd51c4d5cf0a4b702.tar.xz yuzu-82151d407d8021fa8865cf8dd51c4d5cf0a4b702.tar.zst yuzu-82151d407d8021fa8865cf8dd51c4d5cf0a4b702.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/timer.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/hle/kernel/timer.cpp b/src/core/hle/kernel/timer.cpp index d7ec93672..a93a6c87a 100644 --- a/src/core/hle/kernel/timer.cpp +++ b/src/core/hle/kernel/timer.cpp @@ -14,7 +14,7 @@ namespace Kernel { /// The event type of the generic timer callback event -static int timer_callback_event_type; +static CoreTiming::EventType* timer_callback_event_type = nullptr; // TODO(yuriks): This can be removed if Timer objects are explicitly pooled in the future, allowing // us to simply use a pool index or similar. static Kernel::HandleTable timer_callback_handle_table; @@ -57,9 +57,7 @@ void Timer::Set(s64 initial, s64 interval) { // Immediately invoke the callback Signal(0); } else { - u64 initial_microseconds = initial / 1000; - CoreTiming::ScheduleEvent(usToCycles(initial_microseconds), timer_callback_event_type, - callback_handle); + CoreTiming::ScheduleEvent(nsToCycles(initial), timer_callback_event_type, callback_handle); } } @@ -88,8 +86,7 @@ void Timer::Signal(int cycles_late) { if (interval_delay != 0) { // Reschedule the timer with the interval delay - u64 interval_microseconds = interval_delay / 1000; - CoreTiming::ScheduleEvent(usToCycles(interval_microseconds) - cycles_late, + CoreTiming::ScheduleEvent(nsToCycles(interval_delay) - cycles_late, timer_callback_event_type, callback_handle); } } |