Plugin Helper: Timer
The timer
plugin helper manages event timers.
Here is an example:
The launched timer is managed by the plugin helper. No need of timer shutdown code in plugin's shutdown
method. The plugin shutdowns the launched timers automatically.
Methods
timer_execute(title, interval, repeat: true, &block)
timer_execute(title, interval, repeat: true, &block)
This method executes the timer with the given parameters and routine.
title
: unique symbol valueinterval
: second unitinteger
/float
value.repeat
:true
/false
(default:true
). Iffalse
, timer is one-shot.
Code examples:
Plugins using timer
timer
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is an open-source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
Last updated