05.swoole学习笔记--定时器
<?php //循环执行的定时器 swoole_timer_tick(2000,function($timer_id){ echo "执行 $timer_id \n"; }); swoole_timer_after(3000,function(){ echo "3000后执行 \n"; }); //php index.php //ps -ajft //service iptables stop //关闭防火墙 ?>
<?php //循环执行的定时器 swoole_timer_tick(2000,function($timer_id){ echo "执行 $timer_id \n"; }); swoole_timer_after(3000,function(){ echo "3000后执行 \n"; }); //php index.php //ps -ajft //service iptables stop //关闭防火墙 ?>