Class: Fluent::LoadAverageInput::TimerWatcher
- Inherits:
-
Coolio::TimerWatcher
- Object
- Coolio::TimerWatcher
- Fluent::LoadAverageInput::TimerWatcher
- Defined in:
- lib/fluent/plugin/in_loadaverage.rb
Instance Method Summary collapse
-
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
constructor
A new instance of TimerWatcher.
- #on_timer ⇒ Object
Constructor Details
#initialize(interval, repeat, &callback) ⇒ TimerWatcher
Returns a new instance of TimerWatcher.
9 10 11 12 |
# File 'lib/fluent/plugin/in_loadaverage.rb', line 9 def initialize(interval, repeat, &callback) @callback = callback super(interval, repeat) end |
Instance Method Details
#on_timer ⇒ Object
14 15 16 |
# File 'lib/fluent/plugin/in_loadaverage.rb', line 14 def on_timer @callback.call end |