[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

STINNER Victor report at bugs.python.org
Mon Aug 26 06:55:24 EDT 2019


STINNER Victor <vstinner at redhat.com> added the comment:

> process_time: namespace(adjustable=False, implementation='clock_gettime(CLOCK_PROCESS_CPUTIME_ID)', monotonic=True, resolution=1.0000000000000002e-06)

Using CLOCK_PROCESS_CPUTIME_ID clock for time.process_time() looks good to me. I don't know why depending on how Python is built, you get a different clock.

> process_time: namespace(adjustable=False, implementation='getrusage(RUSAGE_SELF)', monotonic=True, resolution=1e-06)

It should be the same clock than CLOCK_PROCESS_CPUTIME_ID, maybe with a different resolution.

If both are available, we should prefer the clock with the best *effective* resolution.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36205>
_______________________________________


More information about the Python-bugs-list mailing list