summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_timing.py
blob: 984638eeb5cce96c992115371964216ab10cad86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from test_support import verify, 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