libraries: kernel: fix for inaccurate sceKernelGetProcessTime

This commit is contained in:
psucien 2024-08-25 23:29:22 +02:00
parent 6fd4264b5d
commit 78e24852f8
3 changed files with 12 additions and 10 deletions

View file

@ -3,6 +3,7 @@
#include <thread>
#include "common/assert.h"
#include "common/debug.h"
#include "common/native_clock.h"
#include "core/libraries/error_codes.h"
#include "core/libraries/kernel/time_management.h"
@ -30,7 +31,8 @@ u64 PS4_SYSV_ABI sceKernelGetTscFrequency() {
}
u64 PS4_SYSV_ABI sceKernelGetProcessTime() {
return clock->GetProcessTimeUS();
// TODO: this timer should support suspends, so initial ptc needs to be updated on wake up
return clock->GetTimeUS(initial_ptc);
}
u64 PS4_SYSV_ABI sceKernelGetProcessTimeCounter() {