Timer:add怎么传参?求大哥们帮忙看下

zyc900329
public function onWorkerStart($connection)
{
    $a2 = Timer::add(5, array($this, 'auto'));
}
public function auto($types)
{
    xxxxx
}

假如要定时执行auto类函数  怎么传$types那个值?

2150 1 0
1个回答

blogdaren

Timer::add(5, array($this, 'auto'), array(在此填写回调函数的参数值));

  • 暂无评论
年代过于久远,无法发表回答
🔝