php8.5
Home/ Manual/ swoole / timer/ Swoole\Timer::set

Swoole\Timer::set

PHP function Edit on GitHub ✎

Set timer-related parameters

Description

Swoole\Timer::set(array $settings): void

Sets the options used by the timers of the current process.

Warning

This method was deprecated in Swoole 4.6.0 and removed in Swoole 6.0.0. Use swoole_async_set() instead.

Parameters

settings

An associative array of options. Only enable_coroutine is recognised: when set to false, the timer callbacks are executed directly instead of inside a newly created coroutine.

Return Values

Void

Source: reference/swoole/swoole/timer/set.xml · from the official PHP manual (php/doc-en)