Sha256: 18fe32d4a2a5b406cd11048e3ea207182c34b8102bf4d9f40b1859c0a8eca168
Contents?: true
Size: 468 Bytes
Versions: 156
Compression:
Stored size: 468 Bytes
Contents
# encoding: utf-8 require "chronic_duration" module LogStash::Util::DurationFormatter CHRONIC_OPTIONS = { :format => :short } # Take a duration in milliseconds and transform it into # a format that a human can understand. This is currently used by # the API. # # @param [Fixnum] Duration in milliseconds # @return [String] Duration in human format def self.human_format(duration) ChronicDuration.output(duration / 1000, CHRONIC_OPTIONS) end end
Version data entries
156 entries across 153 versions & 14 rubygems