Methods summary
public
|
#
__construct( React\EventLoop\LoopInterface $loop, float $interval, callable $callback, boolean $periodic = false, mixed $data = null )
Constructor initializes the fields of the Timer
Constructor initializes the fields of the Timer
Parameters
- $loop
React\EventLoop\LoopInterface $loop The loop with which this timer is associated
- $interval
float $interval The interval after which this timer will execute, in seconds
- $callback
callable $callback The callback that will be executed when this timer elapses
- $periodic
boolean $periodic Whether the time is periodic
- $data
mixed $data Arbitrary data associated with timer
|
public
React\EventLoop\LoopInterface
|
#
getLoop( )
Get the loop with which this timer is associated
Get the loop with which this timer is associated
Returns
Implementation of
|
public
float
|
#
getInterval( )
Get the interval after which this timer will execute, in seconds
Get the interval after which this timer will execute, in seconds
Returns
float
Implementation of
|
public
callable
|
#
getCallback( )
Get the callback that will be executed when this timer elapses
Get the callback that will be executed when this timer elapses
Returns
callable
Implementation of
|
public
|
#
setData( mixed $data )
Set arbitrary data associated with timer
Set arbitrary data associated with timer
Parameters
Implementation of
|
public
mixed
|
#
getData( )
Get arbitrary data associated with timer
Get arbitrary data associated with timer
Returns
mixed
Implementation of
|
public
boolean
|
#
isPeriodic( )
Determine whether the time is periodic
Determine whether the time is periodic
Returns
boolean
Implementation of
|
public
boolean
|
#
isActive( )
Determine whether the time is active
Determine whether the time is active
Returns
boolean
Implementation of
|
public
|
#
cancel( )
Cancel this timer
Implementation of
|