class Fluent::Plugin::TailInput::TailWatcher::LineBufferTimerFlusher

def initialize(log, flush_interval, &flush_method)

def initialize(log, flush_interval, &flush_method)
  @log = log
  @flush_interval = flush_interval
  @flush_method = flush_method
  @start = nil
end

def on_notify(tw)

def on_notify(tw)
  if @start && @flush_interval
    if Time.now - @start >= @flush_interval
      @flush_method.call(tw)
      tw.line_buffer = nil
      @start = nil
    end
  end
end

def reset_timer

def reset_timer
  @start = Time.now
end