Class: Fluent::LoadAverageInput::TimerWatcher

Inherits:
Coolio::TimerWatcher
  • Object
show all
Defined in:
lib/fluent/plugin/in_loadaverage.rb

Instance Method Summary collapse

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_timerObject



14
15
16
# File 'lib/fluent/plugin/in_loadaverage.rb', line 14

def on_timer
  @callback.call
end