TimerScheduler
in
Tags
Table of Contents
Methods
- cancel() : void
- cancelAll() : void
- isTimerActive() : bool
- startSingleTimer() : void
- Start a single-fire timer. If a timer with this key already exists, it is cancelled first.
- startTimerAtFixedRate() : void
- Start a repeating timer at a fixed rate (drift-compensating).
- startTimerWithFixedDelay() : void
- Start a repeating timer with a fixed delay between completions.
Methods
cancel()
public
cancel(string $key) : void
Parameters
- $key : string
cancelAll()
public
cancelAll() : void
isTimerActive()
public
isTimerActive(string $key) : bool
Parameters
- $key : string
Return values
boolstartSingleTimer()
Start a single-fire timer. If a timer with this key already exists, it is cancelled first.
public
startSingleTimer(string $key, object $message, Duration $delay) : void
Parameters
- $key : string
- $message : object
- $delay : Duration
startTimerAtFixedRate()
Start a repeating timer at a fixed rate (drift-compensating).
public
startTimerAtFixedRate(string $key, object $message, Duration $interval[, Duration|null $initialDelay = null ]) : void
If a timer with this key already exists, it is cancelled first.
Parameters
startTimerWithFixedDelay()
Start a repeating timer with a fixed delay between completions.
public
startTimerWithFixedDelay(string $key, object $message, Duration $delay[, Duration|null $initialDelay = null ]) : void
If a timer with this key already exists, it is cancelled first.