<?php
Swoole\Timer->clear (int $timer_id)
Timer ID
if success, it returns TRUE, otherwise it returns FALSE.
Clear a Timer by Timer ID.
<?php
$count = 0;
function run($timerid, $param)
{
global $count;
$count++;
var_dump($count);
if($count >= 10)
{
Swoole\Timer->clear($timerid);
}
}
Swoole\Timer->tick(1000, "run",["param1", "param2"]);