count-timer#

The Count Timer API reference guide#

class count_timer.CountTimer(duration=0)#

A counting timer, w/ optional expiry, that can be started, paused, resumed and reset.

Configuration:
duration: Number of seconds to elapse before expiration

(optional; default: 0 indicates time never expires)

Methods:

start(): start the timer pause(): pause the timer resume(): resume the timer reset(): reset the timer to default (duration 0/paused/not started)

Properties:

paused: True if timer is paused running: True if timer is running duration: value of the ‘duration’ config param elapsed: time (sec) since timer was started remaining: time (sec) until timer expires

Inspiration from https://stackoverflow.com/a/60027719/4402572

__init__(duration=0)#

Create a new timer.