translate a String interval definition to a int definition

@param interval
@return interval
@throws ScheduleException
323490
private static int toInterval(String interval) throws ScheduleException {
	interval = interval.trim().toLowerCase();
	int i = Caster.toIntValue(interval, 0);
	if (i == 0) {
	    interval = interval.trim();
	    if (interval.equals("once")) return INTERVAL_ONCE;
	    else if (interval.equals("daily")) return INTERVAL_DAY;
	    else if (interval.equals("day")) return INTERVAL_DAY;
	    else if (interval.equals("monthly")) return INTERVAL_MONTH;
	    else if (interval.equals("month")) return INTERVAL_MONTH;
	    else if (interval.equals("weekly")) return INTERVAL_WEEK;
	    else if (interval.equals("week")) return INTERVAL_WEEK;
	    throw new ScheduleException("invalid interval definition [" + interval + "], valid values are [once,daily,monthly,weekly or number]");
	}
	if (i < 10) {
	    throw new ScheduleException("interval must be at least 10");
	}
	return i;
    }
573396
public Interval withStartDate(LocalDate date) {
        requireNonNull(date);
        return new Interval(date, startTime, endDate, endTime, zoneId);
    }
1203288
public static Interval fromToBy(int from, int to, int stepBy)
    {
        if (stepBy == 0)
        {
            throw new IllegalArgumentException("Cannot use a step by of 0");
        }
        if (from > to && stepBy > 0 || from < to && stepBy < 0)
        {
            throw new IllegalArgumentException("Step by is incorrect for the range");
        }
        return new Interval(from, to, stepBy);
    }
411149
public void add(PGInterval interval) {
    interval.setYears(interval.getYears() + getYears());
    interval.setMonths(interval.getMonths() + getMonths());
    interval.setDays(interval.getDays() + getDays());
    interval.setHours(interval.getHours() + getHours());
    interval.setMinutes(interval.getMinutes() + getMinutes());
    interval.setSeconds(interval.getSeconds() + getSeconds());
  }
104304
function convertIntervalToCronTime(interval) {
  const intervalIsEmpty = interval.length === 0;
  const intervalIsTooBig = interval.length > 6;

  if (intervalIsEmpty){
    throw new Error(`The interval can not be empty`);
  } else if (intervalIsTooBig) {
    throw new Error('The interval can not contain more than 6 ranges');
  }

  const timeArray = fillInterval(interval);

  try {
    timeArray[0] = getSecond(timeArray[0]);
    timeArray[1] = getMinute(timeArray[1]);
    timeArray[2] = getHour(timeArray[2], timeArray[1]);
    timeArray[3] = getDayOfMonth(timeArray[3]);
    timeArray[4] = getMonth(timeArray[4]);
    timeArray[5] = getDayOfWeek(timeArray[5]);
  } catch (error){
    throw error;
  }

  const cronTime = `${timeArray[0]} ${timeArray[1]} ${timeArray[2]} ${timeArray[3]} ${timeArray[4]} ${timeArray[5]}`;
  return cronTime;
}
1099929
@ReflectiveAccess
    protected void setInterval(String interval) {
        this.interval = ConversionService.SHARED.convert(interval, Duration.class).orElseThrow(() -> new IllegalArgumentException("Invalid Duration Specified"));
    }
358591
public Node<K, V> get(Interval1D<K> interval) {
    return get(root, interval);
  }
739516
public synchronized void setMaxInactiveInterval(int interval) {
        if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {
            LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames[SET_MAX_INACTIVE_INTERVAL], "interval= " + interval);
        }
        if (_maxInactiveInterval != interval) {
            _maxInactiveInterval = interval;
            maxInactWriteHit = true;
        }
    }
665895
public void scheduleAtWithInterval(final org.easybatch.core.job.Job job, final Date startTime, final int interval) throws JobSchedulerException {
        checkNotNull(job, "job");
        checkNotNull(startTime, "startTime");

        String name = job.getName();
        String jobName = JOB_NAME_PREFIX + name;
        String triggerName = TRIGGER_NAME_PREFIX + name;

        SimpleScheduleBuilder scheduleBuilder = simpleSchedule()
                .withIntervalInSeconds(interval)
                .repeatForever();

        Trigger trigger = newTrigger()
                .withIdentity(triggerName)
                .startAt(startTime)
                .withSchedule(scheduleBuilder)
                .forJob(jobName)
                .build();

        JobDetail jobDetail = getJobDetail(job, jobName);

        try {
            LOGGER.info("Scheduling job ''{}'' to start at {} and every {} second(s)", name, startTime, interval);
            scheduler.scheduleJob(jobDetail, trigger);
        } catch (SchedulerException e) {
            throw new JobSchedulerException(format("Unable to schedule job '%s'", name), e);
        }
    }
65523
public static ScheduledFuture<?> asyncExecutePeriodically(Runnable task, long delay, long interval, TimeUnit t) {
		if (task != null) {
			try {
				return Para.getScheduledExecutorService().scheduleAtFixedRate(task, delay, interval, t);
			} catch (RejectedExecutionException ex) {
				logger.warn(ex.getMessage());
			}
		}
		return null;
	}
841893
public SleepBuilder<T> withInterval(long interval, TimeUnit timeUnit) {
        this.interval = timeUnit.toMillis(interval);
        return this;
    }
1107284
function (interval) {
  var quality;
  var number;

  if (interval instanceof Interval) return interval;

  quality = interval.replace(/\d/g, ''); // Remove digits
  number = parseInt(interval.replace(/\D/g, ''), 10); // Remove non-digits

  if (!quality) { // No quality given, assume major or perfect
    quality = isPerfect(number) ? 'P' : 'M';
  }

  return new Interval(number, quality);
}
316348
public Interval withEndTime(LocalTime time) {
        requireNonNull(time);
        return new Interval(startDate, startTime, endDate, time, zoneId);
    }
199672
public function setDateInterval($interval)
    {
        if (!$interval = CarbonInterval::make($interval)) {
            throw new InvalidArgumentException('Invalid interval.');
        }

        if ($interval->spec() === 'PT0S') {
            throw new InvalidArgumentException('Empty interval is not accepted.');
        }

        $this->dateInterval = $interval;

        $this->isDefaultInterval = false;

        $this->handleChangedParameters();

        return $this;
    }
696933
public static Interval parseInterval(String str) {
        String[] ss = str.split("-");

        Interval interval = new Interval();
        switch (ss.length) {
            case 1:
                interval.start = Long.parseLong(ss[0]);
                interval.stop = interval.start + 1;
                break;
            case 2:
                interval.start = Long.parseLong(ss[0]);
                interval.stop = Long.parseLong(ss[1]) + 1;
                break;
            default:
                throw new RuntimeException(String.format("parseInterval failed due to wrong format: %s", str));
        }

        return interval;
    }
258422
public String interval(Date target) {
		double unit = 1000.0D;
		double dayUnit = DAY / unit;
		double hourUnit = HOUR / unit;
		double minUnit = MINUTE / unit;
		double interval = sinceMillis(target) / unit;
		IntervalDesc desc = theIntervalDesc.get();
		
		if (interval >= 0.0D) {
			if (interval / (12 * 30 * dayUnit) > 1.0D) {
				return asText(target);
			}
			if (interval / (30 * dayUnit) > 1.0D) {
				return String.format("%s%s", (int) (interval / (30 * dayUnit)), desc.getMonthAgo());
			}
			if (interval / (7 * dayUnit) > 1.0D) {
				return String.format("7%s", desc.getDayAgo());
			}
			if ((interval / (7 * dayUnit) <= 1.0D) && (interval / dayUnit >= 1.0D)) {
				return String.format("%s%s", (int) (interval / dayUnit), desc.getDayAgo());
			}
			if ((interval / dayUnit < 1.0D) && (interval / hourUnit >= 1.0D)) {
				return String.format("%s%s", (int) (interval / hourUnit), desc.getHourAgo());
			}
			if ((interval < hourUnit) && (interval >= minUnit)) {
				return String.format("%s%s", (int) (interval / minUnit), desc.getMinuteAgo());
			}
			
			return desc.getJustNow();
		}
		
		return asText(target);
	}
743500
public void setInterval(Interval interval) {
        if (interval == null) {
            interval = INTERVAL_FACTORY.getInstance();
        }
        this.interval = interval;
    }