3 """ clockres - calculates the resolution in seconds of a given timer.
5 Copyright (c) 2006, Marc-Andre Lemburg (mal@egenix.com). See the
6 documentation for further information on copyrights, or contact
7 the author. All Rights Reserved.
18 stop = wallclock() + TEST_TIME
19 spin_loops = range(1000)
29 for i in range(len(values) - 1):
30 diff = values[i+1] - values[i]
35 if __name__ == '__main__':
36 print 'Clock resolution of various timer implementations:'
37 print 'time.clock: %10.3fus' % (clockres(time.clock) * 1e6)
38 print 'time.time: %10.3fus' % (clockres(time.time) * 1e6)
41 print 'systimes.processtime: %10.3fus' % (clockres(systimes.processtime) * 1e6)