Swoole Server clearTimer

Depreciation.
void Swoole\Server::clearTimer ( int $timer_id )

Alias: Swoole\Server->clearTimer( int $timer_id )

<?php
void Swoole\Server->clearTimer(int $timer_id)

Cancel the timer tick or one time tick. Alias of function swoole_timer_clear.

Parameter

  • $timer_id the number of timer id which uniquely identifies a timer

Return

void

Example

$timer_id = $server->tick(1000, function ($id) use ($server) {
    $server->clearTimer($id);
});