public function onWorkerStart($connection) { $a2 = Timer::add(5, array($this, 'auto')); } public function auto($types) { xxxxx }
假如要定时执行auto类函数 怎么传$types那个值?
Timer::add(5, array($this, 'auto'), array(在此填写回调函数的参数值));
Timer::add(5, array($this, 'auto'), array(在此填写回调函数的参数值));