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.
This commit is contained in:
parent
79189c7e3e
commit
42f5fd0ab3
7 changed files with 43 additions and 36 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue