windows环境下,用Timer 不执行[已解决】

simple

windows环境下,用Timer 不执行

$worker->onWorkerStart=function($cur_worker){
    Timer::add(1,function() use ($last_count){
        global $last_count;
        $send_data=array(
              'action'=>'tongji',
              'content'=>"当前在线的人数:{$last_count}"
        );
        $send_str=json_encode($send_data,true);
        sendAll($send_str);
    });
};
1551 0 0
0个回答

年代过于久远,无法发表回答
🔝