demosys.timers.clock.Timer¶
-
demosys.timers.clock.
Timer
¶ Timer based on python
time
. This is the default timer.
Methods¶
-
Timer.
start
()¶ Start the timer by recoding the current
time.time()
preparing to report the number of seconds since this timestamp.
-
Timer.
stop
() → float¶ Stop the timer
Returns: The time the timer was stopped
-
Timer.
pause
()¶ Pause the timer by setting the internal pause time using
time.time()
-
Timer.
toggle_pause
()¶ Toggle the paused state
-
Timer.
get_time
() → float¶ Get the current time in seconds
Returns: The current time in seconds
-
Timer.
set_time
(value: float)¶ Set the current time. This can be used to jump in the timeline.
Parameters: value (float) – The new time