mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-29 14:53:18 +00:00
Merge pull request #593 from shadps4-emu/fix/better_timings
libraries: kernel: fix for inaccurate `sceKernelGetProcessTime`
This commit is contained in:
commit
3627393707
3 changed files with 12 additions and 10 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue