Returns web page maximum load time for given interval and {@link TimeUnit}.

@param intervalName name of the interval
@param unit         {@link TimeUnit}
@return web page maximum load time
762004
public long getWindowMaxLoadTime(final String intervalName, final TimeUnit unit) {
		final long max = windowMaxLoadTime.getValueAsLong(intervalName);
		return max == Constants.MAX_TIME_DEFAULT ? max : unit.transformMillis(max);
	}
806289
@Override
    public <V> V getMaximum(ChronoElement<V> element) {

        V max;

        if (this.timestamp.contains(element)) {
            max = this.timestamp.getMaximum(element);
        } else {
            max = this.moment.getMaximum(element);
        }

        if (
            (element == SECOND_OF_MINUTE)
            && (this.timestamp.getYear() >= 1972)
        ) {
            PlainTimestamp ts = this.timestamp.with(element, max);

            if (!this.zone.isInvalid(ts, ts)) {
                Moment transformed = ts.in(this.zone);
                Moment test = transformed.plus(1, SI.SECONDS);

                if (test.isLeapSecond()) {
                    return element.getType().cast(Integer.valueOf(60));
                }
            }
        }

        return max;

    }
182983
@Override public final long getDelay( TimeUnit unit ) {
    long delay = (_started+_retry)-System.currentTimeMillis();
    return unit.convert( delay, TimeUnit.MILLISECONDS );
  }
1361982
public void setQueryExecuteTimeLimit(long queryExecuteTimeLimit, TimeUnit timeUnit) {
		this.queryExecuteTimeLimitInMs = TimeUnit.MILLISECONDS.convert(queryExecuteTimeLimit, timeUnit);
	}
611897
@Override
    public Configuration defaultTimeout(long time, TimeUnit unit) {
        return defaultTimeout(new Duration(time, unit));
    }
1210765
protected TimeoutId requestTimeout(final long delay, final TimeUnit unit, @Nullable final Object data) {
        return requestTimeout(delay, unit, null, data);
    }
228904
private static Interval<DateUnit> parseDateInterval(JsonNode node) {
		try {
			if (node.hasNonNull("dateInterval") && node.get("dateInterval").hasNonNull("aggregationType")) {
				JsonNode dateInterval = node.get("dateInterval");
				DateUnit unit = DateUnit.valueOf(dateInterval.get("aggregationType").asText().toUpperCase(Locale.ENGLISH));
				JsonNode interval = dateInterval.get("interval");
				String type = interval.get("type").asText().toLowerCase(Locale.ENGLISH);
				if ("relative".equals(type)) {
					// the server may send numbers inside strings
					// or numbers as decimals, e.g. 3.0
					// regardless, we treat them all as int
					String from = interval.get("from").asText();
					String to = interval.get("to").asText();
					return new RelativeInterval<DateUnit>(unit, (int) Float.parseFloat(from), (int) Float.parseFloat(to));
				} else if ("absolute".equals(type)) {
					// an absolute interval
					return new AbsoluteInterval<DateUnit>(unit, unit.parseAbsolute(interval.get("from")),
						unit.parseAbsolute(interval.get("to")));
				} else if ("custom".equals(type)) {
					// a custom interval
					return new CustomInterval<DateUnit>(unit, interval.get("from").asText(), interval.get("to").asText());
				}
			}
		} catch (InvalidIntervalException e) {
			// ignore the interval
		} catch (NumberFormatException e) {
			// ignore the interval
		} catch (IllegalArgumentException e) {
			// ignore the interval
		}
		return null;
	}
81120
public static IUnitizingAnnotationUnit findNextUnit(
			final Iterator<IUnitizingAnnotationUnit> units, int raterIdx) {
		return findNextUnit(units, raterIdx, null);
	}
1072126
public long maxTimestamp()
  {
    return ranges == null
            ? topLevel.markedForDeleteAt
            : Math.max(topLevel.markedForDeleteAt, ranges.maxMarkedAt());
  }
112910
public static final TimeUnit getDurationTimeUnits(int type)
   {
      TimeUnit units;

      switch (type & DURATION_UNITS_MASK)
      {
         case 3:
         {
            units = TimeUnit.MINUTES;
            break;
         }

         case 4:
         {
            units = TimeUnit.ELAPSED_MINUTES;
            break;
         }

         case 5:
         {
            units = TimeUnit.HOURS;
            break;
         }

         case 6:
         {
            units = TimeUnit.ELAPSED_HOURS;
            break;
         }

         case 8:
         {
            units = TimeUnit.ELAPSED_DAYS;
            break;
         }

         case 9:
         {
            units = TimeUnit.WEEKS;
            break;
         }

         case 10:
         {
            units = TimeUnit.ELAPSED_WEEKS;
            break;
         }

         case 11:
         {
            units = TimeUnit.MONTHS;
            break;
         }

         case 12:
         {
            units = TimeUnit.ELAPSED_MONTHS;
            break;
         }

         default:
         case 7:
         {
            units = TimeUnit.DAYS;
            break;
         }
      }

      return (units);
   }
1142845
public long getStartTime(TimeUnit unit) {
        // FIXME use BigInteger representation
        long totalNanos = TimeUnit.SECONDS.toNanos(startTime.getEpochSecond());
        totalNanos += startTime.getNano();
        return unit.convert(totalNanos, TimeUnit.NANOSECONDS);
    }
784493
public static ConcurrentLimitRule of(int concurrentLimit, TimeUnit timeOutUnit, long timeOut) {
        requireNonNull(timeOutUnit, "time out unit can not be null");
        return new ConcurrentLimitRule(concurrentLimit, timeOutUnit.toMillis(timeOut));
    }
1002713
public static long generateInitialBaseTime(long initializeTime, int intarval,
            TimeUnit intervalUnit) throws ParseException
    {
        // １つ大きな単位をベースに基準時刻を取得する。
        // 例：10分間隔をインターバルとし、8:35を起動時刻とした場合、8:00を基準時刻とする。
        long datumTime = generateDatumTime(initializeTime, intervalUnit);

        // 基準時刻から初期生成ファイル名称用の日時を算出する。
        // 例：10分間隔をインターバルとし、8:35を起動時刻とした場合、8:00を基準時刻とし、
        //    そこから8:10、8:20・・・とずらしていって初期生成ファイル名称用の日時(8:30)を算出する。
        long initialBaseTime = generateNextFileBaseTime(initializeTime, datumTime, intarval,
                intervalUnit);

        return initialBaseTime;
    }
767104
public long getDomLastLoadTime(final String intervalName, final TimeUnit unit) {
		return unit.transformMillis(domLastLoadTime.getValueAsLong(intervalName));
	}
430526
public Long getMaxRequestSize()
   {
      if (childNode.getTextValueForPatternName("max-request-size") != null && !childNode.getTextValueForPatternName("max-request-size").equals("null")) {
         return Long.valueOf(childNode.getTextValueForPatternName("max-request-size"));
      }
      return null;
   }
603354
@javax.annotation.Nonnull
  public static TemporalUnit cvt(@javax.annotation.Nonnull final TimeUnit units) {
    switch (units) {
      case DAYS:
        return ChronoUnit.DAYS;
      case HOURS:
        return ChronoUnit.HOURS;
      case MINUTES:
        return ChronoUnit.MINUTES;
      case SECONDS:
        return ChronoUnit.SECONDS;
      case NANOSECONDS:
        return ChronoUnit.NANOS;
      case MICROSECONDS:
        return ChronoUnit.MICROS;
      case MILLISECONDS:
        return ChronoUnit.MILLIS;
      default:
        throw new IllegalArgumentException(units.toString());
    }
  }
783046
public long getCount(long toWhen, long period, TimeUnit unit) {
		return getCount(toWhen - TimeUnit.MILLISECONDS.convert(period, unit), toWhen);
	}