Swoole\Timer::afterExecute a function after a specified time Description
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. Parameters
Return Values
Returns the timer ID, which can be passed to
Swoole\Timer::clear to cancel the timer before it
fires. Returns ExamplesExample #1 Swoole\Timer::after example The above example will output: Hello, Swoole |