core_timing: Make use of std::chrono with ScheduleEvent

This commit is contained in:
Lioncash 2020-07-15 18:30:06 -04:00
parent 263200f982
commit 8b50c660df
13 changed files with 58 additions and 49 deletions

View file

@ -149,11 +149,13 @@ struct KernelCore::Impl {
SchedulerLock lock(kernel);
global_scheduler.PreemptThreads();
}
s64 time_interval = Core::Timing::msToCycles(std::chrono::milliseconds(10));
const auto time_interval = std::chrono::nanoseconds{
Core::Timing::msToCycles(std::chrono::milliseconds(10))};
system.CoreTiming().ScheduleEvent(time_interval, preemption_event);
});
s64 time_interval = Core::Timing::msToCycles(std::chrono::milliseconds(10));
const auto time_interval =
std::chrono::nanoseconds{Core::Timing::msToCycles(std::chrono::milliseconds(10))};
system.CoreTiming().ScheduleEvent(time_interval, preemption_event);
}