Starts the internal timer.
        
        :param      interval | <int>
350174
def _startTimer(self, interval):
        
        if not self.__timer:
            self.__timer = QtCore.QTimer(self)
            self.__timer.setSingleShot(self.__singleShot)
            self.__timer.setInterval(interval)
            self.__timer.timeout.connect(self.timeout)
            self.__timer.destroyed.connect(self._clearTimer)

            # ensure to stop this timer when the app quits
            QtCore.QCoreApplication.instance().aboutToQuit.connect(self.__timer.stop, QtCore.Qt.QueuedConnection)
        
        self.__timer.start(interval)
1274236
function startInterval() {
    if (intervalId !== null) {
        return;
    }
    intervalId = setInterval(function () {
        if (remainedTasks.length && currentCount < limitCount) {
            var task = remainedTasks.shift();
            currentCount++;
            if (monitorCallback) {
                monitorCallback("start", remainedTasks);
            }
            var process = originalSpawn.apply(null, task[0]);
            process.on("close", function (code) {
                if (monitorCallback) {
                    monitorCallback("close", remainedTasks, code);
                }
                currentCount--;
                if (currentCount === 0 && remainedTasks.length === 0) {
                    callWaitAllCallbacks();
                }
            });
            var callback = remainedTaskCallbacks[task[1]];
            delete remainedTaskCallbacks[task[1]];
            if (callback) {
                callback(process);
            }
        }
    }, 20);
}
1263108
def start_runtime(self):
        '''
        
        '''
        while True:
            try:
                self.call_runtime()
            except Exception:
                log.error('Exception in Thorium: ', exc_info=True)
                time.sleep(self.opts['thorium_interval'])
646260
public void setStart(ReadableInstant start) {
        long startMillis = DateTimeUtils.getInstantMillis(start);
        super.setInterval(startMillis, getEndMillis(), getChronology());
    }
29621
public void setInterval(ReadableInterval interval) {
        if (interval == null) {
            throw new IllegalArgumentException("Interval must not be null");
        }
        long startMillis = interval.getStartMillis();
        long endMillis = interval.getEndMillis();
        Chronology chrono = interval.getChronology();
        super.setInterval(startMillis, endMillis, chrono);
    }
697030
public static ClockInterval from(ChronoInterval<PlainTime> interval) {

        if (interval instanceof ClockInterval) {
            return ClockInterval.class.cast(interval);
        } else {
            return new ClockInterval(interval.getStart(), interval.getEnd());
        }

    }
1333197
public void setBackgroundInterval(long interval, TimeUnit unit)
  {
    if (! isValid()) {
      return;
    }
    
    long period = unit.toMillis(interval);
    
    if (_state == StateProfile.IDLE) {
      if (period > 0) {
        _profileTask.setPeriod(period);
        _profileTask.start();
        
        _state = StateProfile.BACKGROUND;
      }
    }
    else if (_state == StateProfile.BACKGROUND) {
      if (period <= 0) {
        _profileTask.stop();
        
        _state = StateProfile.IDLE;
      }
      else if (period != _backgroundPeriod) {
        _profileTask.stop();
        _profileTask.setPeriod(period);
        _profileTask.start();
      }
    }
    
    _backgroundPeriod = period;
  }
1268814
public void addTimeInterval(T interval){
		timeIntervals.add(interval);
		minBorders.setStart(Math.max(minBorders.getStart(), interval.getStart()));
		minBorders.setEnd(Math.min(minBorders.getEnd(), interval.getEnd()));
		if(maxBorders == null){
			maxBorders = interval.clone();
		} else {
			maxBorders.setStart(Math.min(maxBorders.getStart(), interval.getStart()));
			maxBorders.setEnd(Math.max(maxBorders.getEnd(), interval.getEnd()));
		}
	}
1160770
def start(self):
        
        self._timer = Timer(self.time, self.handler)
        self._timer.daemon = True
        self._timer.start()
        return
583961
def init_timer(self, max_value):
    
    self.__max_value = max_value
    self.__prev_tick = time.time()
    self.__unit_per_sec = 0
    self.__unit_per_sec_prev = 0
201207
def __start_timer(self, delay):
        
        self.__timer = threading.Timer(delay, self.__reconnect)
        self.__timer.daemon = True
        self.__timer.start()
186669
public synchronized void start() {
        if (!running) {
            checkState(timer == null);

            timer = new java.util.Timer(true); // use daemon thread internally
            schedulePurging(); // schedule timeout to purge cancelled tasks from the timer task queue

            running = true;
        }
    }
163714
def _start_new_timer(self):
        
        if not self._running.is_set():
            return False
        self._timer = self.timer_impl(
            interval=self._interval,
            function=self._check_for_life_signs
        )
        self._timer.daemon = True
        self._timer.start()
        return True
57051
public void start() {
		synchronized (_lock) {
			// Stop previously set timer
			_timer.purge();

			// Set a new timer
			TimerTask task = new TimerTask() {
				@Override
				public void run() {
					try {
						_task.notify("pip-commons-timer", new Parameters());
					} catch (Exception ex) {
						// Ignore or better log!
					}
				}
			};
			_timer.scheduleAtFixedRate(task, _delay, _interval);

			// Set started flag
			_started = true;
		}
	}
976954
def refresh_interval(self, refresh_interval):
        
        if isinstance(refresh_interval, int) and refresh_interval > 0:
            self._refresh_interval = refresh_interval
        else:
            self._refresh_interval = None
63628
def set_keepalive(self, interval):
        
        pinger = functools.partial(self.ping, 'keep-alive')
        self.reactor.scheduler.execute_every(period=interval, func=pinger)
463367
def interval_wait(self):
        """"""
        # calculate time since last interation and wait to acheive desired interval
        now = time.time()
        elapsed = (now - self.last_tick)*1000
        # print("interval %d, time from start %d \n" % (elapsed, (now - self.start_time)*1000))
        if elapsed < self.interval:
            # print('sleep ', (self.interval-elapsed))
            # self.signals.warning.emit('') # clear previous warning
            time.sleep((self.interval-elapsed)/1000)
            now = time.time()
        elif elapsed > self.interval:
            pass
            # self.signals.warning.emit("WARNING: PROVIDED INTERVAL EXCEEDED, ELAPSED TIME %d" % (elapsed))
        self.last_tick = now