« ZMQDevice::setIdleTimeout
ZMQDevice::setTimerTimeout »

ZMQDevice::setTimerCallback

(No version information available, might only be in Git)

ZMQDevice::setTimerCallback — Set the timer callback function

説明

public function ZMQDevice::setTimerCallback(callable $cb_func, int $timeout, mixed $user_data = ?): ZMQDevice

Sets the timer callback function. The timer callback will be invoked after timeout has passed. The difference between idle and timer callbacks are that idle callback is invoked only when the device is idle. The callback function signature is callback (mixed $user_data). Added in ZMQ extension version 1.1.0.

パラメータ

cb_func

Callback function to invoke when the timer fires. Returning false or a value that evaluates to false from this function will cause the device to stop.

timeout

How often to invoke the timer callback in milliseconds. The timer callback is invoked periodically. The timeout value guarantees that there is at least this amount of milliseconds between invocations of the callback function.

user_data

Additional data to pass to the callback function.

戻り値

On success this method returns the current object.

関連キーワード:
callback   timer   ZMQDevice   timeout   setTimerCallback   user   invoked   idle   func   mixed   between   device   invoke   milliseconds   setIdleTimeout   setTimerTimeout   information   available   callable   Sets   after   passed   difference   callbacks   signature
関連する関数・ページ:
zmqdevice.settimertimeout   class.zmqdevice   zmqdevice.gettimertimeout   zmqdevice.setidlecallback   zmqdevice.setidletimeout   zmqdevice.getidletimeout