[New-bugs-announce] [issue10278] add time.wallclock() method

Kristján Valur Jónsson report at bugs.python.org
Mon Nov 1 16:10:10 CET 2010

New submission from Kristján Valur Jónsson <kristjan at ccpgames.com>:

If measuring time across blocking calls, such as thread synchronization, one currently must time.time().  This is because time.clock() measures cpu seconds on unix.  On windows, however, time.clock() would be more appropriate because it measures wall-clock time.

To avoid having to put platform clauses everywhere, this patch adds time.wallclock().
The current implementation is a simple alias to time.clock on windows and time.time otherwise.  Future improvements may add a better implementation on those non-windows platforms that support it.

components: Interpreter Core
files: wallclock.patch
keywords: patch
messages: 120130
nosy: krisvale
priority: normal
severity: normal
status: open
title: add time.wallclock() method
type: feature request
versions: Python 3.2
Added file: http://bugs.python.org/file19455/wallclock.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list