Adds a recurring callback to execute on a specified interval. Proxies to
addPeriodTimer() implementation of the event loop implementation
returned by getLoop().
public addPeriodicTimer ( numeric $interval, callable $callback ) : React\Event\Timer\TimerInterface | ||
$interval | numeric | Number of seconds to wait between executions of callback |
$callback | callable | Callback to execute |
return | React\Event\Timer\TimerInterface | Added timer |