Computes the delay by taking the default value and the override in the request parameter into the account.

@deprecated as of 1.489
Inject {@link TimeDuration}.
165487
@Deprecated
    public int getDelay(StaplerRequest req) throws ServletException {
        String delay = req.getParameter("delay");
        if (delay==null)    return getQuietPeriod();

        try {
            // TODO: more unit handling
            if(delay.endsWith("sec"))   delay=delay.substring(0,delay.length()-3);
            if(delay.endsWith("secs"))  delay=delay.substring(0,delay.length()-4);
            return Integer.parseInt(delay);
        } catch (NumberFormatException e) {
            throw new ServletException("Invalid delay parameter value: "+delay);
        }
    }
1033211
public Expiring<T> handleFormer() {
		if (null == this.defaultExpireTime || null == this.defaultExpireUnit) {
			throw new UnsupportedOperationException(
					"There is no default expire info, call Expiring#withDefault(long, TimeUnit) first");
		}
		
		this.handleExistEls = true;
		return this;
	}
903867
@Override
	public void setTransactionTimeout(int seconds) throws TransactionManagementException {
		logger.entering(CLASSNAME, "setTransactionTimeout", seconds);
		try {
			userTran.setTransactionTimeout(seconds);
		} catch (SystemException e) {
			throw new TransactionManagementException(e);
		}
		logger.exiting(CLASSNAME, "setTransactionTimeout");
	}
602952
public void setDefaultTimeout(Duration timeout) {

        LettuceAssert.notNull(timeout, "Timeout duration must not be null");
        LettuceAssert.isTrue(!timeout.isNegative(), "Timeout duration must be greater or equal to zero");

        this.timeout = timeout;
    }
774687
private Duration determineDelayDuration(HttpResponse response) {
        int code = response.statusCode();

        // Response will not have a retry-after-ms header.
        if (code != HttpResponseStatus.TOO_MANY_REQUESTS.code()
            && code != HttpResponseStatus.SERVICE_UNAVAILABLE.code()) {
            return this.delayDuration;
        }

        String retryHeader = response.headerValue(RETRY_AFTER_MS_HEADER);

        // Retry header is missing or empty, return the default delay duration.
        if (retryHeader == null || retryHeader.isEmpty()) {
            return this.delayDuration;
        }

        // Use the response delay duration, the server returned it for a reason.
        return Duration.ofMillis(Integer.parseInt(retryHeader));
    }
1139592
private DelayStat delayStatDOToModel(DelayStatDO delayStatDO) {
        DelayStat delayStat = new DelayStat();
        delayStat.setId(delayStatDO.getId());
        delayStat.setDelayTime(delayStatDO.getDelayTime());
        delayStat.setDelayNumber(delayStatDO.getDelayNumber());
        delayStat.setPipelineId(delayStatDO.getPipelineId());
        delayStat.setGmtCreate(delayStatDO.getGmtCreate());
        delayStat.setGmtModified(delayStatDO.getGmtModified());
        return delayStat;

    }
905336
public Long getParameterTime(String name, Long defaultValue)
   {
      String value = getParameterValue(name, null);

      if (value != null)
      {
         try
         {
            return StringNumberParser.parseTime(value);
         }
         catch (NumberFormatException e)
         {
            if (LOG.isTraceEnabled())
            {
               LOG.trace("An exception occurred: " + e.getMessage());
            }
         }
      }
      return defaultValue;
   }
1265111
public long delayBeforeNextRetry(int retriesAttempted) {
        if (retriesAttempted < 1) {
            return initialDelay;
        }


        if (retriesAttempted > 63) {
            return maxDelay;
        }

        long multiplier = ((long)1 << (retriesAttempted - 1));
        if (multiplier > Long.MAX_VALUE / delayInterval) {
            return maxDelay;
        }

        long delay = multiplier * delayInterval;
        delay = Math.min(delay, maxDelay);
        return delay;
    }
1050831
public static final Duration parseDurationInThousanthsOfMinutes(ProjectProperties properties, Number value, TimeUnit targetTimeUnit)
   {
      return parseDurationInFractionsOfMinutes(properties, value, targetTimeUnit, 1000);
   }
1336009
protected TimeoutId requestTimeout(final long delay, final TimeUnit unit) {
        return requestTimeout(delay, unit, null, null);
    }
988013
public ConverterServerBuilder requestTimeout(long timeout, TimeUnit unit) {
        assertNumericArgument(timeout, true);
        this.requestTimeout = unit.toMillis(timeout);
        return this;
    }
29416
public void setTimeVal(long t) {
        int seconds = (int) (t / 1000);
        int millis = (int) (t - 1000 * t);
        this.timeVal = new TimeVal(seconds, millis * 1000, 0);
    }
679031
private IntVar makeDuration() throws SchedulerException {
        if (start.isInstantiated() && end.isInstantiated()) {
            int d = end.getValue() - start.getValue();
            return rp.makeDuration(d, d, lblPrefix, "_duration");
        } else if (start.isInstantiated()) {
            if (start.isInstantiatedTo(0)) {
                return end;
            }
            return rp.getModel().intOffsetView(end, -start.getValue());
        }
        int inf = end.getLB() - start.getUB();
        if (inf < 0) {
            inf = 0;
        }
        int sup = end.getUB() - start.getLB();
        return rp.makeDuration(sup, inf, lblPrefix, "_duration");
    }
346269
private RequestConfig setTimeout(Context context) {
        int socketTimeout = 0;
        int connectionTimeout = 0;
        if ( context.getCustomerRequestTimeout() != null) {
            socketTimeout = context.getCustomerRequestTimeout();
        }else {
            String reqTimeout = Config.getProperty(Config.TIMEOUT_REQUEST);
            if (StringUtils.hasText(reqTimeout)) {
                socketTimeout = new Integer(reqTimeout.trim());
            }
        }

        String connTimeout = Config.getProperty(Config.TIMEOUT_CONNECTION);
        if (StringUtils.hasText(connTimeout)) {
            connectionTimeout = new Integer(connTimeout.trim());
        }
        RequestConfig defaultRequestConfig = RequestConfig.custom()
                .setSocketTimeout(socketTimeout)
                .setConnectTimeout(connectionTimeout)
                .setConnectionRequestTimeout(connectionTimeout)
                .setCookieSpec(CookieSpecs.IGNORE_COOKIES)
                .build();
        return defaultRequestConfig;

    }
1197484
public void setDefaultTransactionTimeout(int timeoutSecs) throws Exception {
        final Address address = Address.root().add(SUBSYSTEM, TRANSACTIONS);
        final ModelNode req = createWriteAttributeRequest("default-timeout", String.valueOf(timeoutSecs), address);
        final ModelNode response = execute(req);

        if (!isSuccess(response)) {
            throw new FailureException(response);
        }
        return;
    }
617949
public void setDuration(@NotNull final Duration duration) {
        if (duration.compareTo(MAXIMUM_DURATION) > 0) {
            throw new IllegalArgumentException("The duaration has to be smaller than 23:59:59.");
        }
        super.setValue(durationToDate(duration));
    }
436724
protected TimeoutId requestTimeout(final long delay, final TimeUnit unit, @Nullable final String name, @Nullable final Object data) {
        return timeoutManager.requestTimeout(context(), state().getSagaId(), delay, unit, name, data);
    }