A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-April/119141.html below:

[Python-Dev] cpython: Issue #14428: Use the new time.perf_counter() and time.process_time() functions

[Python-Dev] cpython: Issue #14428: Use the new time.perf_counter() and time.process_time() functions [Python-Dev] cpython: Issue #14428: Use the new time.perf_counter() and time.process_time() functionsGeorg Brandl g.brandl at gmx.net
Mon Apr 30 12:52:57 CEST 2012
On 29.04.2012 03:04, victor.stinner wrote:
> http://hg.python.org/cpython/rev/bd195749c0a2
> changeset:   76599:bd195749c0a2
> user:        Victor Stinner <victor.stinner at gmail.com>
> date:        Sun Apr 29 03:01:20 2012 +0200
> summary:
>   Issue #14428: Use the new time.perf_counter() and time.process_time() functions

[...]

> diff --git a/Lib/timeit.py b/Lib/timeit.py
> --- a/Lib/timeit.py
> +++ b/Lib/timeit.py
> @@ -15,8 +15,8 @@
>    -n/--number N: how many times to execute 'statement' (default: see below)
>    -r/--repeat N: how many times to repeat the timer (default 3)
>    -s/--setup S: statement to be executed once initially (default 'pass')
> -  -t/--time: use time.time() (default on Unix)
> -  -c/--clock: use time.clock() (default on Windows)
> +  -t/--time: use time.time()
> +  -c/--clock: use time.clock()

Does it make sense to keep the options this way?  IMO the distinction should be
to use either perf_counter() or process_time(), and the options could implement
this (-t -> perf_counter, -c -> process_time).

Georg


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4