Skip to main content

Interface: TimerTask

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

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

Properties

callback()

callback: () => void

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

The function to execute when the timer fires.

Returns

void


delay

delay: number

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

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:20

Elapsed time in milliseconds tracked by the TimerSystem.


interval?

optional interval: number

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

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


maxRuns?

optional maxRuns: number

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

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:25

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


runsSoFar?

optional runsSoFar: number

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

Counter tracking how many times this task has been executed.