Method: Fluent::EventTime.now

Defined in:
lib/fluent/time.rb

.nowObject



114
115
116
117
118
# File 'lib/fluent/time.rb', line 114

def self.now
  # This method is called many time. so call Process.clock_gettime directly instead of Fluent::Clock.real_now
  now = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
  Fluent::EventTime.new(now / 1_000_000_000, now % 1_000_000_000)
end