diff --git a/lib/fluent/time.rb b/lib/fluent/time.rb index e535a027ab..8a4c12ac93 100644 --- a/lib/fluent/time.rb +++ b/lib/fluent/time.rb @@ -114,7 +114,8 @@ def self.eq?(a, b) 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) + sec, nsec = now.divmod(1_000_000_000) + Fluent::EventTime.new(sec, nsec) end def self.parse(*args)