Busy wait for the specified number of milliseconds.
545285
def _busy_wait_ms(self, ms):
        """"""
        start = time.time()
        delta = ms/1000.0
        while (time.time() - start) <= delta:
            pass
1067704
def wait_while(self, condition, *args, **kw):
    
    return self.wait_for(lambda: not condition(), *args, **kw)
300890
protected void delayed(final Runnable runnable, long millis) {
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                try {
                    myExec.execute(runnable);
                } catch (Throwable t) {
                    log(t);
                }
            }
        }, millis);
    }
177984
public static <T> java.util.concurrent.ScheduledFuture<T> delay(final Supplier<T> function,
        final int delayMilliseconds) {
        final java.util.concurrent.ScheduledExecutorService scheduler =
            java.util.concurrent.Executors.newSingleThreadScheduledExecutor();
        final java.util.concurrent.ScheduledFuture<T> future = scheduler.schedule(
            new java.util.concurrent.Callable<T>() {
                public T call() {
                    return function.get();
                }
            }, delayMilliseconds, java.util.concurrent.TimeUnit.MILLISECONDS);
        scheduler.shutdown();
        return future;
    }
14213
def wait(self):
        
        self.wait_event = threading.Event()
        timeout = int(self.timeout) if self.timeout else None
        self.timed_out = not self.wait_event.wait(timeout)
1028237
def wait(self, timeout=None):
        """"""
        self._event.wait(timeout)
        return self._event.isSet()
66119
async def waitUntilAsync(t: datetime.time) -> bool:
    
    t = _fillDate(t)
    now = datetime.datetime.now(t.tzinfo)
    secs = (t - now).total_seconds()
    await asyncio.sleep(secs)
    return True
337977
private synchronized static void waiting(String classname, int fnr,
			int offset)
	{
		m.put(classname, StaticOperationsCounters.waiting[fnr] += offset);
		stateChanged();
	}
1097520
public T waitForRequest(long maxWait) {
        long start = System.currentTimeMillis();
        try {
            while (requestsReceived.get() < 1
                    && (System.currentTimeMillis() - start) < maxWait) {
                try {
                    Thread.sleep(50);
                } catch (InterruptedException ex) {
                    throw new RuntimeException(ex);
                }
            }
        } finally {
            stopServer();
        }

        return getResponse();
    }
457390
def wait(self, dwMilliseconds = None):
        
        if self.value is None:
            raise ValueError("Handle is already closed!")
        if dwMilliseconds is None:
            dwMilliseconds = INFINITE
        r = WaitForSingleObject(self.value, dwMilliseconds)
        if r != WAIT_OBJECT_0:
            raise ctypes.WinError(r)
642512
def wait(self):
        """"""
        now = _monotonic()
        if now < self._ref:
            delay = max(0, self._ref - now)
            self.sleep_func(delay)
        self._update_ref()
139696
def wait_one(self):
        """"""
        while True:
            try:
                item = self.output_queue.get(True, self.polltime)
            except Queue.Empty:
                continue
            except KeyboardInterrupt:
                LOGGER.debug('Exiting')
                return
            else:
                item.check_result()
                return
228996
def wait_for(self, timeout=3000):
        """"""
        results = [None]
        results_called = [False]

        def results_callback(val):
            results[0] = val
            results_called[0] = True

        self.then(results_callback)

        start = time.time()
        while not results_called[0]:
            if time.time() - start > timeout / 1000.:
                raise Exception('Timeout of %d ms reached' % timeout)
            ip.kernel.do_one_iteration()
        return results[0]
1318894
public void waitForLock(T jedis){
        while(!lock(jedis)){
            try {
                logger.debug("Waiting for Redis lock.");
                Thread.sleep(randomInt(75, 125));
            } catch (InterruptedException e) {
                logger.error("Interrupted while waiting for lock.", e);
            }
        }
    }
109647
def _wait(self, args, now, cap, consumed_history, consumed_capacity):
        
        for key in ['read', 'write']:
            if key in cap and cap[key] > 0:
                consumed_history[key].add(now, consumed_capacity[key])
                consumed = consumed_history[key].value
                if consumed > 0 and consumed >= cap[key]:
                    seconds = math.ceil(float(consumed) / cap[key])
                    LOG.debug("Rate limited throughput exceeded. Sleeping "
                              "for %d seconds.", seconds)
                    if callable(self.callback):
                        callback_args = args + (seconds,)
                        if self.callback(*callback_args):
                            continue
                    time.sleep(seconds)
307542
function waitAndSet() {
          var i;
          var times = [0,200,400,700,1000,1500,2000];
          var len = times.length;
          for ( i = 0; i < len; i++ ) {
            $timeout(setParentHeight,times[i]);
          }
        }
547134
def wait(self, timeout=None):
        
        import threading

        if self._state!=self.PENDING:
            return

        e = threading.Event()
        self.addCallback(lambda v: e.set())
        self.addErrback(lambda r: e.set())
        e.wait(timeout)