diff options
author | Barry Warsaw <barry@python.org> | 1997-01-13 23:03:07 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1997-01-13 23:03:07 (GMT) |
commit | a6aca46fcb628825452bbfd8d00999eafa6248ba (patch) | |
tree | 6fc98621a08c4f35a761a79893d878711951b5b3 /Lib | |
parent | 58d40a7400811db24a6fc384651476b4f390d8c0 (diff) | |
download | cpython-a6aca46fcb628825452bbfd8d00999eafa6248ba.zip cpython-a6aca46fcb628825452bbfd8d00999eafa6248ba.tar.gz cpython-a6aca46fcb628825452bbfd8d00999eafa6248ba.tar.bz2 |
Test of the timing module
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_timing.py | 21 |
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 |