[issue14428] Implementation of the PEP 418

STINNER Victor report at bugs.python.org
Mon Apr 30 01:54:02 CEST 2012


STINNER Victor <victor.stinner at gmail.com> added the comment:

> You mean that process_time() doesn't return seconds?

Yes, dt is not a number of seconds in the following example:

t1=time.process_time(); (...); t2=time.process_time(); dt=t2-t1

> I see two options: either increase the total running time,
> to make it really likely you'll get a chance to run
> (or decrase the lower threshold), or use times(2), and
> check the result against that (does Windows have such a syscall?).

I wrote the test to check if time.process_time() measures the total CPU of the process, and not the CPU time of only the current thread.

I'm tired of this PEP, so I just removed the test. I don't think that it is really interesting and it looks difficult to write a reliable test.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14428>
_______________________________________


More information about the Python-bugs-list mailing list