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 lemburg
Recipients belopolsky, benhoyt, benjamin.peterson, ethan.furman, fdrake, lemburg, mrabarnett, serhiy.storchaka, vstinner
Date 2017-10-22.13:16:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <0545c552-ead0-c26e-2ea1-8a969154fc71@egenix.com>
In-reply-to <1508678076.34.0.213398074469.issue31803@psf.upfronthosting.co.za>
Content
On 22.10.2017 15:14, Serhiy Storchaka wrote:
> 
> Serhiy Storchaka <storchaka+cpython@gmail.com> added the comment:
> 
> On non-Windows platforms clock() returns the processor time, perf_counter() does include time elapsed during sleep.
> 
>>>> import time
>>>> start = time.clock(); time.sleep(1); print(time.clock() - start)
> 9.700000000001374e-05
>>>> start = time.perf_counter(); time.sleep(1); print(time.perf_counter() - start)
> 1.000714950998372

Thanks for pointing that out. I didn't know.

Is there a different clock with similar accuracy we can use
to only count CPU time on Unix ?
History
Date User Action Args
2017-10-22 13:16:24lemburgsetrecipients: + lemburg, fdrake, belopolsky, vstinner, benjamin.peterson, mrabarnett, benhoyt, ethan.furman, serhiy.storchaka
2017-10-22 13:16:24lemburglinkissue31803 messages
2017-10-22 13:16:24lemburgcreate