summaryrefslogtreecommitdiffstats
path: root/Lib/timeit.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-10-18 15:18:21 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-10-18 15:18:21 (GMT)
commit3d7feb9ac2662cd6854ad34a1705e4035e2b385f (patch)
treec100ff4d4e7460192cac777cfe23d00fe33ff425 /Lib/timeit.py
parent1b90115304bb77a0dff16c463e2015a1645ab320 (diff)
downloadcpython-3d7feb9ac2662cd6854ad34a1705e4035e2b385f.zip
cpython-3d7feb9ac2662cd6854ad34a1705e4035e2b385f.tar.gz
cpython-3d7feb9ac2662cd6854ad34a1705e4035e2b385f.tar.bz2
timeit: remove --clock and --time options
Issue #28240: timeit: remove -c/--clock and -t/--time command line options which were deprecated since Python 3.3.
Diffstat (limited to 'Lib/timeit.py')
-rw-r--r--Lib/timeit.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/timeit.py b/Lib/timeit.py
index d40998c..3395b36 100644
--- a/Lib/timeit.py
+++ b/Lib/timeit.py
@@ -9,7 +9,7 @@ the Python Cookbook, published by O'Reilly.
Library usage: see the Timer class.
Command line usage:
- python timeit.py [-n N] [-r N] [-s S] [-t] [-c] [-p] [-h] [--] [statement]
+ python timeit.py [-n N] [-r N] [-s S] [-p] [-h] [--] [statement]
Options:
-n/--number N: how many times to execute 'statement' (default: see below)
@@ -17,8 +17,6 @@ Options:
-s/--setup S: statement to be executed once initially (default 'pass').
Execution time of this setup statement is NOT timed.
-p/--process: use time.process_time() (default is time.perf_counter())
- -t/--time: use time.time() (deprecated)
- -c/--clock: use time.clock() (deprecated)
-v/--verbose: print raw timing results; repeat for more digits precision
-u/--unit: set the output time unit (usec, msec, or sec)
-h/--help: print this usage message and exit
@@ -291,10 +289,6 @@ def main(args=None, *, _wrap_timer=None):
repeat = int(a)
if repeat <= 0:
repeat = 1
- if o in ("-t", "--time"):
- timer = time.time
- if o in ("-c", "--clock"):
- timer = time.clock
if o in ("-p", "--process"):
timer = time.process_time
if o in ("-v", "--verbose"):