Activate interval
768518
function() {
            clearInterval(pgwSlider.intervalEvent);

            if (pgwSlider.slideCount > 1 && pgwSlider.config.autoSlide) {
                pgwSlider.intervalEvent = setInterval(function() {
                    if (pgwSlider.currentSlide + 1 <= pgwSlider.slideCount) {
                        var nextItem = pgwSlider.currentSlide + 1;
                    } else {
                        var nextItem = 1;
                    }
                    displayElement(nextItem);
                }, pgwSlider.config.intervalDuration);
            }

            return true;
        }
860912
private static void refineInterval(double[] interval, int cd, int mask) {
        if ((cd & mask) != 0)
            interval[0] = (interval[0] + interval[1]) / 2;
        else
            interval[1] = (interval[0] + interval[1]) / 2;
    }
1189172
def execute_until_false(method, interval_s):  # pylint: disable=invalid-name
  
  interval = Interval(method, stop_if_false=True)
  interval.start(interval_s)
  return interval
1366694
function run() {
  const current = now();
  const queue = timeoutQueue.slice();
  let interval = INTERVAL_MAX;

  timeoutQueue.length = 0;

  // Reset
  if (runRafId > 0 || runTimeoutId > 0) {
    stop();
  }

  for (let i = queue.length - 1; i >= 0; i--) {
    const item = queue[i];

    if (!item.cancelled) {
      const duration = item.time - current;

      if (duration <= 0) {
        if (isDev) {
          debug('timeout triggered for "%s" at %s', item.id, new Date().toLocaleTimeString());
        }
        item.fn.apply(item.fn, item.args);
      } else {
        // Store smallest duration
        if (duration < interval) {
          interval = duration;
        }
        timeoutQueue.push(item);
      }
    }
  }

  // Loop
  if (timeoutQueue.length > 0) {
    // Use raf if requested interval is less than cutoff
    if (interval < INTERVAL_CUTOFF) {
      runRafId = raf(run);
    } else {
      runTimeoutId = setTimeout(run, interval);
    }
  }
}
6699
def set_interval(self, interval=None, change_status=True,
                     force_update=False):
        """"""
        if interval is None:
            interval = self._interval
        interval = self._restrict_interval(interval)
        if not force_update and interval == self._interval:
            return
        self._interval = interval
        start, end = interval
        self.clear()

        # Set the status message.
        if change_status:
            self.set_status('Interval: {:.3f} s - {:.3f} s'.format(start, end))

        # Load the traces.
        traces = self.traces(interval)

        # Find the data bounds.
        ymin, ymax = traces.data.min(), traces.data.max()
        data_bounds = (start, ymin, end, ymax)

        # Used for spike click.
        self._data_bounds = data_bounds
        self._waveform_times = []

        # Plot the traces.
        self._plot_traces(traces.data,
                          color=traces.get('color', None),
                          data_bounds=data_bounds,
                          )

        # Plot the spikes.
        waveforms = traces.waveforms
        assert isinstance(waveforms, list)
        for w in waveforms:
            self._plot_waveforms(waveforms=w.data,
                                 color=w.color,
                                 channel_ids=w.get('channel_ids', None),
                                 start_time=w.start_time,
                                 data_bounds=data_bounds,
                                 )
            self._waveform_times.append((w.start_time,
                                         w.spike_id,
                                         w.spike_cluster,
                                         w.get('channel_ids', None),
                                         ))

        # Plot the labels.
        if self.do_show_labels:
            self._plot_labels(traces.data, data_bounds=data_bounds)

        self.build()
        self.update()
1306032
function  () {
        if (this._intervalId) {
            clearInterval(this._intervalId);
            this._intervalId = undefined;
            this.trigger(this.options.stoppedEventName, this);
            return true;
        }
        return false;
    }
1099929
@ReflectiveAccess
    protected void setInterval(String interval) {
        this.interval = ConversionService.SHARED.convert(interval, Duration.class).orElseThrow(() -> new IllegalArgumentException("Invalid Duration Specified"));
    }
743500
public void setInterval(Interval interval) {
        if (interval == null) {
            interval = INTERVAL_FACTORY.getInstance();
        }
        this.interval = interval;
    }
1356597
function() {
        if(this.interval && typeof this.interval === "number" && 
            this.interval > 0) {

            this.timer = window.setInterval(
                OpenLayers.Function.bind(this.refresh, this),
                this.interval);
        }
    }
524558
def is_in_intervall(value, min_value, max_value, name='variable'):
    
    if not (min_value <= value <= max_value):
        raise ValueError('{}={} is not in [{}, {}]'
                         .format(name, value, min_value, max_value))
1118293
def set_keepalive(self, interval, callback):
        
        self.__keepalive_interval = interval
        self.__keepalive_callback = callback
        self.__keepalive_last = time.time()
1050260
def intervals(start, end, interval):
    
    interval = _seconds_or_timedelta(interval)
    current_timestamp = start
    while current_timestamp.epoch < end.epoch:
        yield current_timestamp

        current_timestamp = current_timestamp.add(
            seconds=interval.total_seconds()
        )
984282
public T visitInterval(Interval elm, C context) {
        if (elm.getLow() != null) {
            visitElement(elm.getLow(), context);
        }
        if (elm.getLowClosedExpression() != null) {
            visitElement(elm.getLowClosedExpression(), context);
        }
        if (elm.getHigh() != null) {
            visitElement(elm.getHigh(), context);
        }
        if (elm.getHighClosedExpression() != null) {
            visitElement(elm.getHighClosedExpression(), context);
        }
        return null;
    }
290852
def addinterval(instr, add, interval):
    '''
        
    '''
    if not isinstance(instr, str):
        instr = str(instr)

    return add.join(
        instr[i:i+interval]
        for i in xrange(0,len(instr),interval))
1143881
def first_interval_starting(self, start: datetime.datetime) -> \
            Optional[Interval]:
        
        for i in self.intervals:
            if i.start == start:
                return i
        return None
601647
public void setPeriod(ReadableInterval interval) {
        if (interval == null) {
            setPeriod(0L);
        } else {
            Chronology chrono = DateTimeUtils.getChronology(interval.getChronology());
            setPeriod(interval.getStartMillis(), interval.getEndMillis(), chrono);
        }
    }
245440
function() {

		this._enable = (Firestorm.Environment.requestAnimationFrame && Lava.schema.system.ALLOW_REQUEST_ANIMATION_FRAME)
			? this._enable_AnimationFrame
			: this._enable_Interval;

	}