class Fluent::PluginHelper::Timer::TimerWatcher

def on_timer

def on_timer
  @callback.call if @checker.call
rescue => e
  @log.error "Unexpected error raised. Stopping the timer.", title: @title, error: e
  @log.error_backtrace
  detach
  @log.error "Timer detached.", title: @title
ensure
  @detacher.call(self) unless @repeat
end