Swoole\Timer->set

Declaration

<?php
Swoole\Timer->set ( array $settings )

Parameters

settings
  • enable_coroutine => TRUE: enable the coroutine support

Return

success

if success, it returns TRUE, otherwise it returns FALSE.

Description

Set the runtime settings of the Timer. The settings can be accessed by $timer->setting.

Example

<?php
$timer->set(array(
    'enable_coroutine' => TRUE
));