Timer¶
-
class
imagepypelines.
Timer
[source]¶ Bases:
object
Timer which can be used to time processes
Example
#we need to do an action for 10 seconds timer = Timer() timer.countdown = 10
- while timer.countdown:
do_action() #this action will run for (about) 10 seconds
# maybe we want to record how long a part of our code runs timer.reset()
do_action() print( timer.lap() )
do_action2() print( timer.lap() )
Attributes Summary
Methods Summary
lap
()returns time in seconds since last time the lap was called
lap_ms
()returns time in milliseconds since last time the lap was called
raw_time
()returns the unrounded time in seconds since the timer started
reset
()resets the timer start time
time
()returns the time in seconds since the timer started or since it was last reset
time_ms
()returns the time in milliseonds since the timer started or since it was last reset
Attributes Documentation
-
countdown
¶
-
start
¶
Methods Documentation