Optional
mode?: ClockModeOptional
interval?: Duration | DurationParams | numberThe frequency of the update loop. Values of zero or less will cause updates as fast as possible (not recommended).
A number value will be treated as milliseconds.
Default: 500ms
Optional
target?: Duration | DurationParams | numberThe target value for the clock. This is where counting will finish.
A number value will be treated as milliseconds.
Default: 0s in countdown mode OR MAX_SAFE_INTERGER millis in stopwatch mode
Optional
initial?: Duration | DurationParams | numberThe initial value on the clock. This is where counting will start from.
A number value will be treated as milliseconds.
Default: 0s
Generated using TypeDoc
The mode the clock should run in.
'stopwatch' - clock will count forwards through time. If initial is greater than target, the clock will stop instantly.
'countdown' - clock will count backwards through time. If initial is less than target, the clock will stop instantly.
Default: 'stopwatch'