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

Version Path
logstash-core-6.8.23-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.22-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.21-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.20-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.19-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.18-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.17-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.16-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.15-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.14-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.13-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.12-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.11-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.10-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.9-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.8-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.7-java lib/logstash/util/duration_formatter.rb
logstash-core-7.5.2-java lib/logstash/util/duration_formatter.rb
logstash-core-7.5.1-java lib/logstash/util/duration_formatter.rb
logstash-core-6.8.6-java lib/logstash/util/duration_formatter.rb