diff --git a/kernel/ps4_libkernel.pas b/kernel/ps4_libkernel.pas index 5431f2b..cedfddc 100644 --- a/kernel/ps4_libkernel.pas +++ b/kernel/ps4_libkernel.pas @@ -1645,6 +1645,9 @@ begin lib^.set_proc($9FCF2FC770B99D6F,@ps4_gettimeofday); lib^.set_proc($B26223EDEAB3644F,@ps4_clock_getres); lib^.set_proc($94B313F6F240724D,@ps4_clock_gettime); + + lib^.set_proc($C1161503966896CA,@ps4_sceKernelClockGetres); + lib^.set_proc($7A37A471A35036AD,@ps4_sceKernelGettimeofday); lib^.set_proc($90E7277ABCA99D00,@ps4_sceKernelGettimezone); diff --git a/kernel/ps4_time.pas b/kernel/ps4_time.pas index 5cb3a47..3074bbc 100644 --- a/kernel/ps4_time.pas +++ b/kernel/ps4_time.pas @@ -36,6 +36,8 @@ function ps4_gettimeofday(tv:Ptimeval;tz:Ptimezone):Integer; SysV_ABI_CDecl; function ps4_clock_getres(clock_id:Integer;tp:Ptimespec):Integer; SysV_ABI_CDecl; function ps4_clock_gettime(clock_id:Integer;tp:Ptimespec):Integer; SysV_ABI_CDecl; +function ps4_sceKernelClockGetres(clock_id:Integer;tp:Ptimespec):Integer; SysV_ABI_CDecl; + function ps4_sceKernelGettimeofday(tv:Ptimeval):Integer; SysV_ABI_CDecl; function ps4_sceKernelGettimezone(tz:Ptimezone):Integer; SysV_ABI_CDecl; @@ -173,7 +175,8 @@ end; function ps4_sceKernelSettimeofday(tv:Ptimeval;tz:Ptimezone):Integer; SysV_ABI_CDecl; begin - Result:=_set_errno(px2sce(EPERM)); + _set_errno(EPERM); + Result:=px2sce(EPERM); end; function ps4_clock_getres(clock_id:Integer;tp:Ptimespec):Integer; SysV_ABI_CDecl; @@ -214,6 +217,15 @@ begin end; +function ps4_sceKernelClockGetres(clock_id:Integer;tp:Ptimespec):Integer; SysV_ABI_CDecl; +begin + Result:=ps4_clock_getres(clock_id,tp); + if (Result<>0) then + begin + Result:=px2sce(PInteger(_error)^); + end; +end; + function mul_div_u64(m,d,v:QWORD):QWORD; sysv_abi_default; assembler; nostackframe; asm movq v,%rax