Skip to main content
8 events
when toggle format what by license comment
Jan 15, 2022 at 10:58 comment added mxmlnkn time.process_time does not include time spent in sleep, which might be an issue when trying to time multithreaded code or code waiting for I/O in my experience. The only timer, which does not have that problem is time.time but it slower. Isn't there any other alternative which includes time spent in sleep?
Mar 4, 2016 at 18:59 comment added Jim Aho As can be read here it seems the behaviour of time.clock() was depedent on the platform, and time.process_time() is not. This is the reason why time.clock() was deprecated.
Jul 7, 2015 at 13:50 history edited haggai_e CC BY-SA 3.0
wrong link for timeit module
Oct 29, 2014 at 19:44 history edited Jason Navarrete CC BY-SA 3.0
time.clock() deprecated in 3.3, adding suggested alternatives
Oct 28, 2014 at 17:42 comment added jfs @smci: Python bug: remove obsolete remark in time.clock() docs
Nov 16, 2012 at 19:47 comment added smci @Corey Goldberg: so did you submit a documentation bug? (They meant "use clock() rather than time():, but yeah it's sloppy)
Sep 19, 2008 at 19:44 comment added Corey Goldberg "this is the function to use for benchmarking Python or timing algorithms."<br> The Python docs don't seem to be accurate based on the answers given here. time.clock() is not always what you want for benchmarking. especially with the existence of the timeit module
Sep 17, 2008 at 17:18 history answered Jason Navarrete CC BY-SA 2.5