[docs] [issue20806] os.times document points to wrong section of non-Linux manual

Eryk Sun report at bugs.python.org
Sun Aug 25 19:53:51 EDT 2019


Eryk Sun <eryksun at gmail.com> added the comment:

The function's doc string also needs to be updated to use the correct field names: "user", "system", "children_user", "children_system", and "elapsed".

> And we can also add a link to MSDN.

os.times calls GetProcessTimes [1]. The user and kernel process times are incremented in clock ticks, i.e. in integer multiples of the system clock interrupt time. QueryUnbiasedInterruptTime [2] could thus be used for the value of `elapsed`. 

(Windows doesn't implement a process tree for the children_user and children_system values. It has jobs, which are similar to Linux control groups, but jobs aren't applicable here. POSIX doesn't have anything like Windows jobs or Linux cgroups.)

[1] https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getprocesstimes
[2] https://docs.microsoft.com/en-us/windows/win32/api/realtimeapiset/nf-realtimeapiset-queryunbiasedinterrupttime

----------
nosy: +eryksun

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


More information about the docs mailing list