Sha256: 00d6af67c9b960c2fe2cfaf6be31ff19942557e2393ad96304c183316e72ec89
Contents?: true
Size: 469 Bytes
Versions: 45
Compression:
Stored size: 469 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 [Integer] 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
45 entries across 45 versions & 1 rubygems