diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 9132d1d77..f9d821a80 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | namespace Kernel { | 26 | namespace Kernel { |
| 27 | 27 | ||
| 28 | /// Event type for the thread wake up event | 28 | /// Event type for the thread wake up event |
| 29 | static int ThreadWakeupEventType; | 29 | static CoreTiming::EventType* ThreadWakeupEventType = nullptr; |
| 30 | 30 | ||
| 31 | bool Thread::ShouldWait(Thread* thread) const { | 31 | bool Thread::ShouldWait(Thread* thread) const { |
| 32 | return status != THREADSTATUS_DEAD; | 32 | return status != THREADSTATUS_DEAD; |
| @@ -265,8 +265,7 @@ void Thread::WakeAfterDelay(s64 nanoseconds) { | |||
| 265 | if (nanoseconds == -1) | 265 | if (nanoseconds == -1) |
| 266 | return; | 266 | return; |
| 267 | 267 | ||
| 268 | u64 microseconds = nanoseconds / 1000; | 268 | CoreTiming::ScheduleEvent(nsToCycles(nanoseconds), ThreadWakeupEventType, callback_handle); |
| 269 | CoreTiming::ScheduleEvent(usToCycles(microseconds), ThreadWakeupEventType, callback_handle); | ||
| 270 | } | 269 | } |
| 271 | 270 | ||
| 272 | void Thread::ResumeFromWait() { | 271 | void Thread::ResumeFromWait() { |