diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-04-23 00:01:08 -0400 |
|---|---|---|
| committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-06-07 21:44:42 -0400 |
| commit | 8e56a84566036cfff0aa5c3d80ae1b051d2bd0bf (patch) | |
| tree | 2bb7be86aafe9986811758b508a7581d2efe8ac4 /src/core/hle/kernel/svc | |
| parent | bbd502f67adb17b00b33f1b7158cfff2b2fa8a3e (diff) | |
core_timing: Use CNTPCT as the guest CPU tick
Previously, we were mixing the raw CPU frequency and CNTFRQ.
The raw CPU frequency (1020 MHz) should've never been used as CNTPCT (whose frequency is CNTFRQ) is the only counter available.
Diffstat (limited to 'src/core/hle/kernel/svc')
| -rw-r--r-- | src/core/hle/kernel/svc/svc_info.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc/svc_info.cpp b/src/core/hle/kernel/svc/svc_info.cpp index 2b2c878b5..445cdd87b 100644 --- a/src/core/hle/kernel/svc/svc_info.cpp +++ b/src/core/hle/kernel/svc/svc_info.cpp @@ -199,9 +199,9 @@ Result GetInfo(Core::System& system, u64* result, InfoType info_id_type, Handle if (same_thread && info_sub_id == 0xFFFFFFFFFFFFFFFF) { const u64 thread_ticks = current_thread->GetCpuTime(); - out_ticks = thread_ticks + (core_timing.GetCPUTicks() - prev_ctx_ticks); + out_ticks = thread_ticks + (core_timing.GetClockTicks() - prev_ctx_ticks); } else if (same_thread && info_sub_id == system.Kernel().CurrentPhysicalCoreIndex()) { - out_ticks = core_timing.GetCPUTicks() - prev_ctx_ticks; + out_ticks = core_timing.GetClockTicks() - prev_ctx_ticks; } *result = out_ticks; |
