summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_scheduler.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2023-04-23 06:01:08 +0200
committerMorph <39850852+Morph1984@users.noreply.github.com>2023-06-08 03:44:42 +0200
commit8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf (patch)
tree2bb7be86aafe9986811758b508a7581d2efe8ac4 /src/core/hle/kernel/k_scheduler.cpp
parentnvnflinger: Acquire lock prior to signaling the vsync variable (diff)
downloadyuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.tar
yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.tar.gz
yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.tar.bz2
yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.tar.lz
yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.tar.xz
yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.tar.zst
yuzu-8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_scheduler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp
index faa12b4f0..75ce5a23c 100644
--- a/src/core/hle/kernel/k_scheduler.cpp
+++ b/src/core/hle/kernel/k_scheduler.cpp
@@ -184,7 +184,8 @@ u64 KScheduler::UpdateHighestPriorityThread(KThread* highest_thread) {
prev_highest_thread != highest_thread) [[likely]] {
if (prev_highest_thread != nullptr) [[likely]] {
IncrementScheduledCount(prev_highest_thread);
- prev_highest_thread->SetLastScheduledTick(m_kernel.System().CoreTiming().GetCPUTicks());
+ prev_highest_thread->SetLastScheduledTick(
+ m_kernel.System().CoreTiming().GetClockTicks());
}
if (m_state.should_count_idle) {
if (highest_thread != nullptr) [[likely]] {
@@ -351,7 +352,7 @@ void KScheduler::SwitchThread(KThread* next_thread) {
// Update the CPU time tracking variables.
const s64 prev_tick = m_last_context_switch_time;
- const s64 cur_tick = m_kernel.System().CoreTiming().GetCPUTicks();
+ const s64 cur_tick = m_kernel.System().CoreTiming().GetClockTicks();
const s64 tick_diff = cur_tick - prev_tick;
cur_thread->AddCpuTime(m_core_id, tick_diff);
if (cur_process != nullptr) {