docs: public static final int getDurationInterval(final String duration) {
      if (duration == null || duration.isEmpty()) {
        throw new IllegalArgumentException("Duration cannot be null or empty");
      }
      if (duration.contains(".")) {
        throw new IllegalArgumentException("Floating point intervals are not supported");
      }
      int unit = 0;
      while (Character.isDigit(duration.charAt(unit))) {
        unit++;
      }
      int interval;
      try {
        interval = Integer.parseInt(duration.substring(0, unit));
      } catch (NumberFormatException e) {
        throw new IllegalArgumentException("Invalid duration (number): " + duration);
      }
      if (interval <= 0) {
        throw new IllegalArgumentException("Zero or negative duration: " + duration);
      }
      return interval;
    }