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-25.16:09:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
On 25.10.2017 01:31, STINNER Victor wrote:
> Marc-Andre: "Yes, to avoid yet another Python 2/3 difference. It should be replaced with the appropriate variant on Windows and non-Windows platforms. From Serhiy's response that's time.process_time() on non-Windows platforms and time.perf_counter() on Windows."
> I don't understand why you mean by "replaced with". Do you mean modify the implementation of the time.clock()?

What I meant is that time.clock() is replaced with the higher
accuracy timers corresponding to the current time.clock()
implementation on the various platforms in order to retain
backwards compatibility.

In other words:

if sys.platform == 'win32':
    time.clock = time.perf_counter
    time.clock = time.process_time

I know that time.clock() behaves differently on different platforms,
but this fact has been known for a long time and is being used by
Python code out there for timing purposes.
Date User Action Args
2017-10-25 16:09:05lemburgsetrecipients: + lemburg, fdrake, belopolsky, vstinner, benjamin.peterson, mrabarnett, benhoyt, ethan.furman, serhiy.storchaka
2017-10-25 16:09:05lemburglinkissue31803 messages
2017-10-25 16:09:05lemburgcreate