« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 96 for timer (0.004 sec.)
The Swoole\Timer class | PHP 8.3 10466
The Swoole\Timer class (PECL swoole >= 1.9.0) はじめに Millisecond precision timer. The underlying implementation is based on epoll_wait and setitimer, using a min-heap data structure that supports adding a large number of timers. In synchr ... onous I/O processes, such as the Manager and TaskWorker processes, it is implemented using setitimer and signals. In asynchronous I/O processes, it is implemented using the timeout of epoll_wait/kevent/poll/select. The unde ... rlying system does not support timers with a delay of 0 ; values below 1 millisecond emit an E_WARNING and the call fails. This differs from languages such as ... ::defer() may be used to achieve similar functionality. <?php Swoole\Event :: defer (function () { echo "hello\n" ; }); ?> Timer Correction: The execution time of the timer callback function does not affect the timing of the next timer execution. For ...
https://man.mtool.work/php/8.3/class.swoole-timer.html
Swoole\Timer::info — Get information about a timer. | PHP 8.3 10177
Swoole\Timer::info (No version information available, might only be in Git) Swoole\Timer::info — Get information about a timer. 説明 public static function Swoole\Timer::info ( int $timer_id ): ? array Get information about a timer. As of S ... woole 4.4.0. パラメータ timer_id The timer ID returned by Swoole\Timer::tick() or Swoole\Timer::after() . 戻り値 Returns an array describing the timer, ... or null if no timer with this ID exists in the current process. The array contains the following keys: exec_msec The time of the next executio ... n, in milliseconds, counted from the moment the timer subsystem was started. It is not a duration. exec_count The number of times the callback has been executed. Available as o ...
https://man.mtool.work/php/8.3/swoole-timer.info.html
Swoole\Timer::clear — Delete a timer by ID | PHP 8.3 9796
Swoole\Timer::clear (PECL swoole >= 1.9.0) Swoole\Timer::clear — Delete a timer by ID 説明 public static function Swoole\Timer::clear ( int $timer_id ): bool Deletes the timer with the given ID. Only timers created by the current process ca ... n be removed; timers belonging to other processes are not visible here. パラメータ timer_id The timer ID returned by Swoole\Timer::tick() or S ... woole\Timer::after() . 戻り値 成功した場合に true を、失敗した場合に false を返します。 false is returned when no timer with this ID e ... xists in the current process, or when the ID refers to an internal timer. 例 例1 Swoole\Timer::clear() example <?php $timer_id = Swoole\Timer :: after ( 1000 , function () { echo "never printed\n ...
https://man.mtool.work/php/8.3/swoole-timer.clear.html
Swoole\Timer::tick — Set a repeating interval timer | PHP 8.3 9744
Swoole\Timer::tick (PECL swoole >= 1.9.0) Swoole\Timer::tick — Set a repeating interval timer 説明 public static function Swoole\Timer::tick ( int $ms , callable $callback , mixed ...$params ): int | false Sets a timer that triggers every m ... s milliseconds. Unlike a timer created with Swoole\Timer::after() , it keeps triggering until it is removed with Swoole\Timer::clear() . パラメータ ms Th ... value emits an E_WARNING and the call fails. callback The function to execute on every tick. It is called as callback(int $timer_id, mixed ...$params) : the ID of the timer is passed as the first argument, followed by the values given in params . para ... ms Additional values passed to callback after the timer ID. 戻り値 Returns the timer ID, which can be passed to Swoole\Timer::clear() . Returns false if the timer could not be cr ...
https://man.mtool.work/php/8.3/swoole-timer.tick.html
Swoole\Timer::list — Get an iterator over the timers of the current process | P... 9626
Swoole\Timer::list (No version information available, might only be in Git) Swoole\Timer::list — Get an iterator over the timers of the current process 説明 public static function Swoole\Timer::list (): Swoole\Timer\Iterator Returns an iter ... ator over the IDs of the timers created from PHP in the current process. Timers created internally by Swoole are not listed. As of Swoole 4.4.0. 戻り値 R ... eturns a Swoole\Timer\Iterator object, which extends ArrayIterator and yields the timer IDs as int values. The iterator is a snapshot taken when ... the method is called; it is empty when no timer exists. 例 例1 Swoole\Timer::list() example <?php Swoole\Timer :: tick ( 1000 , function () {}); Swoole\Timer :: after ( 5 ...
https://man.mtool.work/php/8.3/swoole-timer.list.html
Swoole\Timer::stats — Get timer statistics. | PHP 8.3 9481
Swoole\Timer::stats (No version information available, might only be in Git) Swoole\Timer::stats — Get timer statistics. 説明 public static function Swoole\Timer::stats (): array Get timer statistics. As of Swoole 4.4.0. 戻り値 Returns an a ... rray with the following keys: initialized Whether the timer subsystem has been started. It is false until the first timer is created. num The number of timers currently registered in ... the process. round The current round of the timer loop. 例 例1 Swoole\Timer::stats() example <?php $timer_id = Swoole\Timer :: tick ( 1000 , function () {}); var_dump ( Swo ... ole\Timer :: stats ()); Swoole\Timer :: clear ( $timer_id ); ?> 上の例の出力は、 たとえば以下のようになります。 array(3) { ["initial ...
https://man.mtool.work/php/8.3/swoole-timer.stats.html
Swoole\Timer::exists — Check if a timer is existed. | PHP 8.3 9455
Swoole\Timer::exists (PECL swoole >= 1.9.0) Swoole\Timer::exists — Check if a timer is existed. 説明 public static function Swoole\Timer::exists ( int $timer_id ): bool Checks whether a timer with the given ID exists in the current process. ... パラメータ timer_id The timer ID returned by Swoole\Timer::tick() or Swoole\Timer::after() . 戻り値 Returns true if a timer with this ID ex ... ists in the current process, false otherwise. 他のマニュアルの関連ページ Python timeit Python timerfd Linux JM timer_delete(2) Linux JM fork(2) Vim version8 Python none ...
https://man.mtool.work/php/8.3/swoole-timer.exists.html
Swoole\Timer::after — Execute a function after a specified time | PHP 8.3 9271
Swoole\Timer::after (PECL swoole >= 1.9.0) Swoole\Timer::after — Execute a function after a specified time 説明 public static function Swoole\Timer::after ( int $ms , callable $callback , mixed ...$params ): int | false Creates a one-shot timer ... s. callback The function to execute once the delay has elapsed. It is called as callback(mixed ...$params) . Unlike Swoole\Timer::tick() , the timer ID is not passed to the callback. params Additional values passed to callback . 戻り値 Returns the tim ... er ID, which can be passed to Swoole\Timer::clear() to cancel the timer before it fires. Returns false if the timer could not be created, in particular when ms is le ... ss than 1 . 例 例1 Swoole\Timer::after() example <?php Swoole\Timer :: after ( 1000 , function ( string $name ) { echo "Hello, $name \n" ; }, "Swoole" ); ...
https://man.mtool.work/php/8.3/swoole-timer.after.html
Swoole\Server::clearTimer — Stop and destroy a timer. | PHP 8.3 9100
Swoole\Server::clearTimer swoole_timer_clear (PECL swoole >= 1.9.0) Swoole\Server::clearTimer -- swoole_timer_clear — Stop and destroy a timer. 説明 オブジェクト指向型 (method): public function Swoole\Server::clearTimer ( int $timer_id ): v ... oid 手続き型: function swoole_timer_clear ( int $timer_id ): void Stop and destroy a timer パラメータ timer_id 戻り値 他のマニュアルの関連ページ Linux JM time ...
https://man.mtool.work/php/8.3/swoole-server.cleartimer.html
swoole_timer_exists — Check if a timer callback function is existed | PHP 8.3 8812
swoole_timer_exists (PECL swoole >= 1.9.0) swoole_timer_exists — Check if a timer callback function is existed 説明 function swoole_timer_exists ( int $timer_id ): bool パラメータ timer_id 戻り値 他のマニュアルの関連ページ Linux JM timer_de ...
https://man.mtool.work/php/8.3/function.swoole-timer-exists.html
PREV 1 2 3 4 5 6 7 8 9 10 NEXT