Lines Matching defs:time
3 """Tool for measuring execution time of small code snippets.
18 -t/--time: use time.time() (default on Unix)
19 -c/--clock: use time.clock() (default on Windows)
31 successive powers of 10 until the total time is at least 0.2 seconds.
34 clock() has microsecond granularity but time()'s granularity is 1/60th
36 time() is much more precise. On either platform, the default timer
37 functions measure wall clock time, not the CPU time. This means that
40 repeat the timing a few times and use the best time. The -r option is
42 cases. On Unix, you can use clock() to measure CPU time.
57 import time
71 # On Windows, the best timer is time.clock()
72 default_timer = time.clock
74 # On most other platforms the best timer is time.time()
75 default_timer = time.time
113 To measure the execution time of the first statement, use the
179 """Time 'number' executions of the main statement.
182 then returns the time it takes to execute the main statement
256 "time", "clock", "verbose", "help"])
277 if o in ("-t", "--time"):
278 timer = time.time
280 timer = time.clock
296 # determine number so that 0.2 <= total time < 2.0