fix(libkernel): read process CPU time for clock id 21 #18470
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/18470"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-11-11T17:19:02Z.
What
Implement clock ID 21 in
clock_gettimeandsceKernelClockGettimeusing the existing process CPU clock. On firmware 13.590.001, clock 21 advanced with process CPU use, matched clock 2 during idle and busy measurements, and returned values in microsecond steps. AnyPS5 now truncates the returned value to microseconds. The host CPU clock may update less often. Retail export behavior is unverified. Console measurementsThe resolution query is covered separately by #17958. #18466 addresses clock ID 20 and touches the same source and debt entry. Either branch can be reviewed on main, with a small rebase after the first merges.
Tested
guest_freebsd_clocks,guest_cpu_time_clocks,guest_thread_cpu_clock, andpublic_headers.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T17:42:11Z.
Review: APPROVED
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against
b249a39f9a:tools/check_conventions.pypassed;git diff --checkclean.guest_freebsd_clocks_testsbuilt cleanly.guest_freebsd_clocks):core/libs/prx/libkernel/Time/Time.cppreverted tomainand the new tests kept, the suite fails: Restoring the change makes it pass again.Looks Good To Me