How long to wait in seconds before this crontab entry can next be
        executed.
164133
def next(self, now=None, increments=_increments, delta=True, default_utc=WARN_CHANGE):
        '''
        
        '''
        if default_utc is WARN_CHANGE and (isinstance(now, _number_types) or (now and not now.tzinfo) or now is None):
            warnings.warn(WARNING_CHANGE_MESSAGE, FutureWarning, 2)
            default_utc = False

        now = now or (datetime.utcnow() if default_utc and default_utc is not WARN_CHANGE else datetime.now())
        if isinstance(now, _number_types):
            now = datetime.utcfromtimestamp(now) if default_utc else datetime.fromtimestamp(now)

        # handle timezones if the datetime object has a timezone and get a
        # reasonable future/past start time
        onow, now = now, now.replace(tzinfo=None)
        tz = onow.tzinfo
        future = now.replace(microsecond=0) + increments[0]()
        if future < now:
            # we are going backwards...
            _test = lambda: future.year < self.matchers.year
            if now.microsecond:
                future = now.replace(microsecond=0)
        else:
            # we are going forwards
            _test = lambda: self.matchers.year < future.year

        # Start from the year and work our way down. Any time we increment a
        # higher-magnitude value, we reset all lower-magnitude values. This
        # gets us performance without sacrificing correctness. Still more
        # complicated than a brute-force approach, but also orders of
        # magnitude faster in basically all cases.
        to_test = ENTRIES - 1
        while to_test >= 0:
            if not self._test_match(to_test, future):
                inc = increments[to_test](future, self.matchers)
                future += inc
                for i in xrange(0, to_test):
                    future = increments[ENTRIES+i](future, inc)
                try:
                    if _test():
                        return None
                except:
                    print(future, type(future), type(inc))
                    raise
                to_test = ENTRIES-1
                continue
            to_test -= 1

        # verify the match
        match = [self._test_match(i, future) for i in xrange(ENTRIES)]
        _assert(all(match),
            "\nYou have discovered a bug with crontab, please notify the\n" \
            "author with the following information:\n" \
            "crontab: %r\n" \
            "now: %r", ' '.join(m.input for m in self.matchers), now)

        if not delta:
            onow = now = datetime(1970, 1, 1)

        delay = future - now
        if tz:
            delay += _fix_none(onow.utcoffset())
            if hasattr(tz, 'localize'):
                delay -= _fix_none(tz.localize(future).utcoffset())
            else:
                delay -= _fix_none(future.replace(tzinfo=tz).utcoffset())

        return delay.days * 86400 + delay.seconds + delay.microseconds / 1000000.
1356658
public function wait()
    {
        $pid = $this->getSupervisorPid();
        if (!empty($pid)) {
            while ($this->isProcessRunning($pid)) {
                sleep(1);
            }
        }
    }
985935
function longWait (message, timer, cb) {
	setTimeout(function () {
		console.log(message);
		cb("pang"); //always return "pang"
	}, timer); //wait one second before logging
}
729128
private static void waiting(int milliseconds) {
        long t0, t1;
        t0 = System.currentTimeMillis();
        do {
            t1 = System.currentTimeMillis();
        } while ((t1 - t0) < milliseconds);
    }
953089
def _WaitForStartup(self, deadline):
    
    start = time.time()
    sleep = 0.05

    def Elapsed():
      return time.time() - start

    while True:
      try:
        response, _ = self._http.request(self._host)
        if response.status == 200:
          logging.info('emulator responded after %f seconds', Elapsed())
          return True
      except (socket.error, httplib.ResponseNotReady):
        pass
      if Elapsed() >= deadline:
        # Out of time; give up.
        return False
      else:
        time.sleep(sleep)
        sleep *= 2
962898
function(crontab) {
    let _config = this[$EXTRA];
    
    _config.logger.info(`Setting up cron schedule ${crontab}`);

    _config.job = new CronJob({
      cronTime: crontab,
      onTick: _.bind(co.wrap(this._cronCallback), this),
      start: true,
    });

    /* calculate and save time between runs */
    
    // we add 1 second to next date otherwise, _getNextDateFrom() returns 
    // the same date back
    let nextRunDate = _config.job.nextDate().add(1, 'seconds');

    _config.timeBetweenRunsMs = 
      _config.job.cronTime._getNextDateFrom(nextRunDate).valueOf() - nextRunDate.valueOf();
  }
1295822
def _wait(jid):
    '''
    
    '''
    if jid is None:
        jid = salt.utils.jid.gen_jid(__opts__)
    states = _prior_running_states(jid)
    while states:
        time.sleep(1)
        states = _prior_running_states(jid)
683555
def task_wait(meow, heartbeat, polling_interval, timeout, task_id, timeout_exit_code):
    
    task_wait_with_io(
        meow, heartbeat, polling_interval, timeout, task_id, timeout_exit_code
    )
947108
def wait_until_done(self, timeout=None):
        """"""
        start = datetime.now()
        if not self.__th:
            raise IndraDBRestResponseError("There is no thread waiting to "
                                           "complete.")
        self.__th.join(timeout)
        now = datetime.now()
        dt = now - start
        if self.__th.is_alive():
            logger.warning("Timed out after %0.3f seconds waiting for "
                           "statement load to complete." % dt.total_seconds())
            ret = False
        else:
            logger.info("Waited %0.3f seconds for statements to finish loading."
                        % dt.total_seconds())
            ret = True
        return ret
563981
def waitStarted(self):
        """"""
        ns = None
        while not ns:
            try:
                time.sleep(3)
                ns = Pyro.naming.NameServerLocator(
                    identification=self.identification).getNS()
            except Pyro.errors.NamingError as er:
                pass
590445
def wait_for_login(self, timeout=90):
        """"""
        WebDriverWait(self.driver, timeout).until(
            EC.visibility_of_element_located((By.CSS_SELECTOR, self._SELECTORS['mainPage']))
        )
1285592
def wait_until_done(self):
        
        wait = 1
        while True:
            time.sleep(wait)
            self.get_info()
            if self.info['status']['isFinished']:
                break
            # implements a crude exponential back off
            wait = min(wait * 2, 60)
281277
protected void checkNext ()
    {
        _executingNow = !_queue.isEmpty();
        if (_executingNow) {
            // start up a thread to execute the task in question
            ExecutorTask task = _queue.remove(0);
            final ExecutorThread thread = new ExecutorThread(task);
            thread.start();

            // start up a timer that will abort this thread after the specified timeout
            new Interval(Interval.RUN_DIRECT) {
                @Override public void expired () {
                    // this will NOOP if the task has already completed
                    thread.abort();
                }
            }.schedule(task.getTimeout());
        }
    }
941480
def wait(self, seconds=None, **kw):
        ''
        # Use ping/pong to unblock recv for polling transport
        self._heartbeat_thread.hurry()
        # Use timeout to unblock recv for websocket transport
        self._transport.set_timeout(seconds=1)
        # Listen
        warning_screen = self._yield_warning_screen(seconds)
        for elapsed_time in warning_screen:
            if self._should_stop_waiting(**kw):
                break
            try:
                try:
                    self._process_packets()
                except TimeoutError:
                    pass
                except KeyboardInterrupt:
                    self._close()
                    raise
            except ConnectionError as e:
                self._opened = False
                try:
                    warning = Exception('[connection error] %s' % e)
                    warning_screen.throw(warning)
                except StopIteration:
                    self._warn(warning)
                try:
                    namespace = self.get_namespace()
                    namespace._find_packet_callback('disconnect')()
                except PacketError:
                    pass
        self._heartbeat_thread.relax()
        self._transport.set_timeout()
575024
private int calculateWaitCyclesFromWaitTime() {

        String serverWaitTime = System.getProperty(BootstrapConstants.SERVER_START_WAIT_TIME);

        if ((serverWaitTime == null) || serverWaitTime.trim().equals("")) {
            return BootstrapConstants.MAX_POLL_ATTEMPTS;
        }

        int waitTime = 0;
        try {
            waitTime = Integer.parseInt(System.getProperty(BootstrapConstants.SERVER_START_WAIT_TIME));

            if (waitTime < 1) {
                return 1;
            }
        } catch (Throwable t) {

            return BootstrapConstants.MAX_POLL_ATTEMPTS;
        }
        int waitCycles = (int) (TimeUnit.MILLISECONDS.convert(waitTime, TimeUnit.SECONDS) / BootstrapConstants.POLL_INTERVAL_MS);

        return waitCycles;
    }
1161238
def wait_until(time_label):
    '''
     
    '''
    if time_label == 'next_minute':
        gevent.sleep(60 - int(time.time()) % 60)
    elif time_label == 'next_hour':
        gevent.sleep(3600 - int(time.time()) % 3600)
    elif time_label == 'tomorrow':
        gevent.sleep(86400 - int(time.time()) % 86400)
368794
def wait
      perform_operation do |redis|
        redis.blpop(wait_key, MAX_OP_WAIT_TIME - 3)
        redis.del(wait_key)
      end
    end