Merge pull request #593 from shadps4-emu/fix/better_timings

libraries: kernel: fix for inaccurate `sceKernelGetProcessTime`
This commit is contained in:
georgemoralis 2024-08-26 10:56:54 +03:00 committed by GitHub
commit 3627393707
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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() {