code: public static long getDurationInNanos(final String propertyName, final long defaultValue)
      {
          final String propertyValue = getProperty(propertyName);
          if (propertyValue != null)
          {
              final long value = parseDuration(propertyName, propertyValue);
              if (value < 0)
              {
                  throw new NumberFormatException(propertyName + " must be positive: " + value);
              }
  
              return value;
          }
  
          return defaultValue;
      }
docs: Get a string representation of a time duration with an optional suffix of 's', 'ms', 'us', or 'ns' suffix to
  indicate seconds, milliseconds, microseconds, or nanoseconds respectively.
  <p>
  If the resulting duration is greater than {@link Long#MAX_VALUE} then {@link Long#MAX_VALUE} is used.
  
  @param propertyName associated with the duration value.
  @param defaultValue to be used if the property is not present.
  @return the long value.
  @throws NumberFormatException if the value is negative or malformed.