Counts down from a duration set at setup time, with pause/reset.
Constructors
new
Starts unset (zero? true), with no duration.
SourceInstance methods
expired?
True once the countdown has reached zero (requires being set).
Sourcepaused?
True when set, stopped, and not yet expired.
Sourceremaining
Time left before expiration, never negative.
Sourcereset
Unsets the timer and clears its duration and accumulated time.
SourceSets the countdown duration and (re)initializes the clock, stopped.
Can be called again on an already-set timer to change the duration.
Sourceset?
True once set is called; false after reset. start is a no-op
until set.
Sourcestart
No-op until set has been called (unlike Clock#start).
Sourcezero?
True when the timer has no duration set yet.
Source