2012/4/9 Guido van Rossum <gu...@python.org>: >>You may need two clocks >> for this: >> * time.perf_counter(): high-resolution timer for benchmarking, count >> time elasped during a sleep >> * time.process_time(): High-resolution (?) per-process timer from the >> CPU. (other possible names: time.process_cpu_time() or >> time.cpu_time()) > > TBH I don't need another timer that measures CPU time (not even on > Windows). In a sense, measuring CPU time is a relic from the age of > mainframes and timesharing, where CPU time was the most precious > resource (and in some cases the unit in which other resources were > expressed for accounting purposes). In modern days, it's much more > likely that the time you're measuring is somehow related to how long a > use has to wait for some result (e.g. web response times) and here > "wait time" is just as real as CPU time.
Ah. In this case, my initial proposition is correct. I re-added the pseudo-code: http://www.python.org/dev/peps/pep-0418/#deferred-api-time-perf-counter Use QueryPerformanceCounter(), or time.monotonic() or time.time(). Victor _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com