getMain()->getTimer()->setTimeout(function () use ($console, $threads) { $console->log("一秒后执行"); $threads->sleep(1000); $console->log("再一秒后执行"); }, 1000); $threads->sleep(1000); $console->log("一秒后执行");