class ElasticAPM::Config::Duration

@api private

def self.parse(str, default_unit:)

def self.parse(str, default_unit:)
  _, negative, amount, unit = REGEX.match(str).to_a
  unit ||= default_unit
  seconds = MULTIPLIERS.fetch(unit.downcase, 1) * amount.to_i
  seconds = 0 - seconds if negative
  new(seconds)
end

def initialize(seconds)

def initialize(seconds)
  @seconds = seconds
end