Swoole\Timer::listGet an iterator over the timers of the current process Description
public static Swoole\Timer\Iterator Swoole\Timer::list()
Returns an iterator over the IDs of the timers created from PHP in the current process. Timers created internally by Swoole are not listed. As of Swoole 4.4.0. Return ValuesReturns a Swoole\Timer\Iterator object, which extends ArrayIterator and yields the timer IDs as int values. The iterator is a snapshot taken when the method is called; it is empty when no timer exists. ExamplesExample #1 Swoole\Timer::list example The above example will output something similar to: 1 2 |