class Fluent::Logger::EventTime

Constants

TYPE

Public Class Methods

from_msgpack_ext(data) click to toggle source
# File lib/fluent/logger/fluent_logger.rb, line 44
def self.from_msgpack_ext(data)
  new(*data.unpack('NN'))
end
new(sec, nsec = 0) click to toggle source
# File lib/fluent/logger/fluent_logger.rb, line 31
def initialize(sec, nsec = 0)
  @sec = sec
  @nsec = nsec
end

Public Instance Methods

to_json(*args) click to toggle source
# File lib/fluent/logger/fluent_logger.rb, line 48
def to_json(*args)
  @sec.to_s
end
to_msgpack(io = nil) click to toggle source
# File lib/fluent/logger/fluent_logger.rb, line 36
def to_msgpack(io = nil)
  @sec.to_msgpack(io)
end
to_msgpack_ext() click to toggle source
# File lib/fluent/logger/fluent_logger.rb, line 40
def to_msgpack_ext
  [@sec, @nsec].pack('NN')
end