Skip to main content

Interface: TimerTask

Defined in: timer/components/timer-component.ts:7

Represents a single timer task that can execute a callback after a delay.

Properties

callback

callback: () => void

Defined in: timer/components/timer-component.ts:11

The function to execute when the timer fires.

Returns

void


delay

delay: number

Defined in: timer/components/timer-component.ts:16

Milliseconds until first execution for one-shot timers, or initial delay before first run for repeating timers.


elapsed

elapsed: number

Defined in: timer/components/timer-component.ts:21

Elapsed time in milliseconds tracked by the TimerSystem.


interval?

optional interval?: number

Defined in: timer/components/timer-component.ts:31

Milliseconds between repeated executions (only used when repeat is true).


maxRuns?

optional maxRuns?: number

Defined in: timer/components/timer-component.ts:36

Optional limit on how many times a repeating task can execute before being removed.


repeat?

optional repeat?: boolean

Defined in: timer/components/timer-component.ts:26

If true, this task will repeat periodically after the initial delay.


runsSoFar?

optional runsSoFar?: number

Defined in: timer/components/timer-component.ts:41

Counter tracking how many times this task has been executed.