Swoole\Timer::afterExecute a function after a specified time 説明
public static intfalse Swoole\Timer::after(int
$ms, callable $callback, mixed ...$params)Creates a one-shot timer, which is destroyed once its callback has run. Unlike sleep, it does not block the current process. パラメータ
戻り値
Returns the timer ID, which can be passed to
Swoole\Timer::clear to cancel the timer before it
fires. Returns 例例1 Swoole\Timer::after example 上の例の出力は以下となります。 Hello, Swoole |