diff options
author | bunnei <bunneidev@gmail.com> | 2020-07-18 07:45:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-18 07:45:10 +0200 |
commit | 4a8cb9a70671db5684dadf10061f3c3cf1d27741 (patch) | |
tree | 76ff712dc903f71245bd6108519b125ca6fac99e /src/core/hle/kernel/kernel.cpp | |
parent | Merge pull request #4373 from lioncash/allocator (diff) | |
parent | core_timing: Remove unused data member (diff) | |
download | yuzu-4a8cb9a70671db5684dadf10061f3c3cf1d27741.tar yuzu-4a8cb9a70671db5684dadf10061f3c3cf1d27741.tar.gz yuzu-4a8cb9a70671db5684dadf10061f3c3cf1d27741.tar.bz2 yuzu-4a8cb9a70671db5684dadf10061f3c3cf1d27741.tar.lz yuzu-4a8cb9a70671db5684dadf10061f3c3cf1d27741.tar.xz yuzu-4a8cb9a70671db5684dadf10061f3c3cf1d27741.tar.zst yuzu-4a8cb9a70671db5684dadf10061f3c3cf1d27741.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index e1c7a0f3b..8dd4a2637 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -145,16 +145,18 @@ struct KernelCore::Impl { void InitializePreemption(KernelCore& kernel) { preemption_event = Core::Timing::CreateEvent( - "PreemptionCallback", [this, &kernel](u64 userdata, s64 cycles_late) { + "PreemptionCallback", [this, &kernel](u64, std::chrono::nanoseconds) { { 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); } |