mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-12-04 16:40:32 +00:00
On Linux and macOS clock_gettime ids 1 and 2, and id 21 built on id 2, came from times(), which counts in _SC_CLK_TCK ticks (usually 10 ms), and threw when times() failed. They now read getrusage(RUSAGE_SELF) ru_utime and ru_stime in microseconds and set the guest errno on failure, as FreeBSD 11.4 kern_clock_gettime does through calcru and TIMEVAL_TO_TIMESPEC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.0 KiB
1.0 KiB
libkernel
change clock_getres
- clock_getres (libkernel) answers as libc's
clock_getresdid on a PS5 (firmware 11.60, a payload process, #17958) and the raw system call on firmware 12.00 (#15725); the libkernel export itself, a title process and other firmware are unmeasured. Ids 3, 6, 15 to 20 and 22 to 31 fail withEINVAL, the result untouched; id 15 fails though itsclock_gettimesucceeds. Ids 32 and above fail withEINVALtoo, as #14557 added and the console did for 1000 andINT_MAX. Values keep the host's granularity, not the reported resolution; on Windows ids 1, 2 and 21 step per scheduler tick. Encoded CPU clocks (bit 31) answer as id 14 and a null result returns 0 before the id is checked, as FreeBSD 11.4 does; the console agrees for -1 and a null result.