This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, lemburg, neologix, pitrou, python-dev, vstinner
Date 2012-04-29.23:54:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> 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.
Date User Action Args
2012-04-29 23:54:02vstinnersetrecipients: + vstinner, lemburg, pitrou, Arfrever, neologix, python-dev
2012-04-29 23:54:02vstinnersetmessageid: <>
2012-04-29 23:54:01vstinnerlinkissue14428 messages
2012-04-29 23:54:01vstinnercreate