Skip to main content

TimerOptions

Index

Properties

optionalaction

action?: () => void

Action to perform every time the timer fires


Type declaration

    • (): void
    • Action to perform every time the timer fires


      Returns void

optionalfcn

fcn?: () => void
@deprecated

use action: () => void, will be removed in v1.0


Type declaration

    • (): void
    • @deprecated

      use action: () => void, will be removed in v1.0


      Returns void

interval

interval: number

Interval in milliseconds for the timer to fire

optionalnumberOfRepeats

numberOfRepeats?: number

If a number is specified then it will only repeat a number of times

optionalrandom

random?: Random

Optionally provide a random instance to use for random behavior, otherwise a new random will be created seeded from the current time.

optionalrandomRange

randomRange?: [number, number]

Optionally specify a random range of milliseconds for the timer to fire

optionalrepeats

repeats?: boolean

If true the timer repeats every interval infinitely