summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_timing.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>1997-01-13 23:03:07 (GMT)
committerBarry Warsaw <barry@python.org>1997-01-13 23:03:07 (GMT)
commita6aca46fcb628825452bbfd8d00999eafa6248ba (patch)
tree6fc98621a08c4f35a761a79893d878711951b5b3 /Lib/test/test_timing.py
parent58d40a7400811db24a6fc384651476b4f390d8c0 (diff)
downloadcpython-a6aca46fcb628825452bbfd8d00999eafa6248ba.zip
cpython-a6aca46fcb628825452bbfd8d00999eafa6248ba.tar.gz
cpython-a6aca46fcb628825452bbfd8d00999eafa6248ba.tar.bz2
Test of the timing module
Diffstat (limited to 'Lib/test/test_timing.py')
-rw-r--r--Lib/test/test_timing.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/Lib/test/test_timing.py b/Lib/test/test_timing.py
new file mode 100644
index 0000000..5dbc895
--- /dev/null
+++ b/Lib/test/test_timing.py
@@ -0,0 +1,21 @@
+from test_support import verbose
+import timing
+
+r = range(100000)
+if verbose:
+ print 'starting...'
+timing.start()
+for i in r:
+ pass
+timing.finish()
+if verbose:
+ print 'finished'
+
+secs = timing.seconds()
+milli = timing.milli()
+micro = timing.micro()
+
+if verbose:
+ print 'seconds:', secs
+ print 'milli :', milli
+ print 'micro :', micro