MICROSECONDS_PER_SECOND
MICROSECONDS_PER_SECOND
A stream_select() based event-loop.
addTimer( $interval, callable $callback) : \React\EventLoop\Timer\TimerInterface
Enqueue a callback to be invoked once after the given interval.
The execution order of timers scheduled to execute at the same time is not guaranteed.
$interval | ||
callable | $callback |
addPeriodicTimer( $interval, callable $callback) : \React\EventLoop\Timer\TimerInterface
Enqueue a callback to be invoked repeatedly after the given interval.
The execution order of timers scheduled to execute at the same time is not guaranteed.
$interval | ||
callable | $callback |
cancelTimer(\React\EventLoop\Timer\TimerInterface $timer)
Cancel a pending timer.
\React\EventLoop\Timer\TimerInterface | $timer |
isTimerActive(\React\EventLoop\Timer\TimerInterface $timer) : boolean
Check if a given timer is active.
\React\EventLoop\Timer\TimerInterface | $timer |
True if the timer is still enqueued for execution.
streamSelect(array $read, array $write, integer|null $timeout) : integer
Emulate a stream_select() implementation that does not break when passed empty stream arrays.
array | $read | |
array | $write | |
integer|null | $timeout | Activity timeout in microseconds, or null to wait forever. |
The total number of streams that are ready for read/write.