Swoole\Timer::exists
PHP function
Edit on GitHub ✎
(PECL swoole >= 1.9.0)
Check if a timer is existed.
Description
Swoole\Timer::exists(int $timer_id): bool
Checks whether a timer with the given ID exists in the current process.
Parameters
timer_idThe timer ID returned by
Swoole\Timer::tickorSwoole\Timer::after.
Return Values
Returns true if a timer with this ID exists in the current process, false otherwise.