docs: @CheckForNull
      public static TimeDuration fromString(@CheckForNull String delay) {
          if (delay == null) {
              return null;
          }
  
          long unitMultiplier = 1L;
          delay = delay.trim();
          try {
              // TODO: more unit handling
              if (delay.endsWith("sec") || delay.endsWith("secs")) {
                  delay = delay.substring(0, delay.lastIndexOf("sec"));
                  delay = delay.trim();
                  unitMultiplier = 1000L;
              }
              return new TimeDuration(Long.parseLong(delay.trim()) * unitMultiplier);
          } catch (NumberFormatException e) {
              throw new IllegalArgumentException("Invalid time duration value: "+delay);
          }
      }