https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228669
Bug ID: 228669 Summary: CLOCK_PROCESS_CPUTIME_ID is unnecessarily inaccurate Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: b...@freebsd.org Reporter: cperc...@freebsd.org clock_gettime(CLOCK_PROCESS_CPUTIME_ID) is far less accurate than clock_gettime(CLOCK_PROF), even though it seems that they should theoretically measure the same thing: CLOCK_PROF Increments when the CPU is running in user or kernel mode. CLOCK_PROCESS_CPUTIME_ID Returns the execution time of the calling process. It looks like this is due to CLOCK_PROF (aka. calcru) adding time from the current time slice, while CLOCK_PROCESS_CPUTIME_ID (aka. get_process_cputime aka rufetch) does not. Since CLOCK_PROCESS_CPUTIME_ID is the version mandated by POSIX, it would be nice if it were at least as accurate as the historical BSD profiling clock ID. -- You are receiving this mail because: You are the assignee for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"