Nexus API Reference

DefaultTimerScheduler
in package
implements TimerScheduler

FinalYes
Tags
psalm-api

Default timer scheduler implementation.

Table of Contents

Interfaces

TimerScheduler

Methods

__construct()  : mixed
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

isTimerActive()

public isTimerActive(string $key) : bool
Parameters
$key : string
Return values
bool

startSingleTimer()

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
$key : string
$message : object
$interval : Duration
$initialDelay : Duration|null = null

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.

Parameters
$key : string
$message : object
$delay : Duration
$initialDelay : Duration|null = null

        
On this page

Search results