Timer
A simple countdown timer.
-
Timer(duration: float)
Properties
Name | Description | Type |
---|---|---|
done | Whether the timer has completed | bool |
time_remaining | The remaining time on the timer in seconds | float |
elapsed_time | The elapsed time since the timer started in seconds | float |
progress | The progress of the timer as a float between 0.0 and 1.0 | float |
Methods
Start
start() → None
Start the timer.
Pause
pause() → None
Pause the timer.
Resume
resume() → None
Resume the timer.
Reset
reset() → None
Reset the timer to its initial state.