def parse_string(str)
      hms = DURATION_REGEXP.match(str)
      raise ArgumentError, "The duration #{str} does not match the expected format #{DURATION_REGEXP}" if hms.nil?
      hms.captures[0].to_i * 60 * 60 + hms.captures[1].to_i * 60 + hms.captures[2].to_i
    end
def parse_string(str)
      hms = DURATION_REGEXP.match(str)
      raise ArgumentError, "The duration #{str} does not match the expected format #{DURATION_REGEXP}" if hms.nil?
      hms.captures[0].to_i * 60 * 60 + hms.captures[1].to_i * 60 + hms.captures[2].to_i
    end
Loads a duration (seconds) from hh:mm:ss string