aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-06-04 19:52:42 -0400
committerLioncash <mathew1800@gmail.com>2019-06-04 20:31:24 -0400
commit97882b84a8a169ae922ab365086ff888f00b9f2c (patch)
tree66fed7f7c35ba2448006f1393a9b868ed29632d5 /src/core/hle/kernel/thread.cpp
parentc5d6bd7f159cbb9430f90754434929616e12d27c (diff)
core/core_timing_util: Use std::chrono types for specifying time units
Makes the interface more type-safe and consistent in terms of return values.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
-rw-r--r--src/core/hle/kernel/thread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 2abf9efca4..c73a409773 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -75,9 +75,9 @@ void Thread::WakeAfterDelay(s64 nanoseconds) {
// This function might be called from any thread so we have to be cautious and use the
// thread-safe version of ScheduleEvent.
+ const s64 cycles = Core::Timing::nsToCycles(std::chrono::nanoseconds{nanoseconds});
Core::System::GetInstance().CoreTiming().ScheduleEventThreadsafe(
- Core::Timing::nsToCycles(nanoseconds), kernel.ThreadWakeupCallbackEventType(),
- callback_handle);
+ cycles, kernel.ThreadWakeupCallbackEventType(), callback_handle);
}
void Thread::CancelWakeupTimer() {