Timer

A simple countdown timer.

  • Timer(duration: float)

Properties


NameDescriptionType
doneWhether the timer has completedbool
time_remainingThe remaining time on the timer in secondsfloat
elapsed_timeThe elapsed time since the timer started in secondsfloat
progressThe progress of the timer as a float between 0.0 and 1.0float

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.