Sleep for the specified number of seconds, logging every
        'wait_log_interval' seconds with progress info.
334386
def responsive_sleep(self, seconds, wait_reason=''):
        """"""
        for x in range(int(seconds)):
            if (self.config.wait_log_interval and
                not x % self.config.wait_log_interval):
                print('%s: %dsec of %dsec' % (wait_reason,
                                              x,
                                              seconds))
            time.sleep(1.0)
1163296
def sleep(self, time):
        
        try:
            task = asyncio.ensure_future(self.core.sleep(time))
            self.loop.run_until_complete(task)

        except asyncio.CancelledError:
            pass
        except RuntimeError:
            pass
801476
def sleep(seconds=0):
    
    loop = evergreen.current.loop
    current = Fiber.current()
    assert loop.task is not current
    timer = loop.call_later(seconds, current.switch)
    try:
        loop.switch()
    finally:
        timer.cancel()
1251290
def nap(self) -> None:
        
        self.log.info(f"Sleeping for {self.delay} seconds.")
        for _ in progress.bar(range(self.delay)):
            time.sleep(1)
1068868
def delay(self):
        """"""
        if self.next_request_timestamp is None:
            return
        sleep_seconds = self.next_request_timestamp - time.time()
        if sleep_seconds <= 0:
            return
        message = "Sleeping: {:0.2f} seconds prior to" " call".format(
            sleep_seconds
        )
        log.debug(message)
        time.sleep(sleep_seconds)
25528
public static void sleep(int milliseconds) {

        try {
            Thread.sleep(milliseconds);
        } catch (InterruptedException e) {
            QuickUtils.log.e("Interrupted exception", e);
        }
    }
80751
def sleep(self, seconds):
        
        try:
            self.lock()
            time.sleep(seconds)
        except compat.TimeoutException:
            _logger.debug("Connection %r timed out while waiting for lock acquisition.", self.container_id)
        finally:
            self.release()
1043813
public void wait(double seconds) {
        String action = "Wait " + seconds + SECONDS;
        String expected = WAITED + seconds + SECONDS;
        try {
            Thread.sleep((long) (seconds * 1000));
        } catch (InterruptedException e) {
            log.warn(e);
            reporter.fail(action, expected, "Failed to wait " + seconds + SECONDS + ". " + e.getMessage());
            Thread.currentThread().interrupt();
            return;
        }
        reporter.pass(action, expected, WAITED + seconds + SECONDS);
    }
804785
async def sleep(self, sleep_time):
        
        try:
            await asyncio.sleep(sleep_time)
        except RuntimeError:
            if self.log_output:
                logging.info('sleep exception')
            else:
                print('sleep exception')
            await self.shutdown()
676136
def _function(self):
        

        start_time = datetime.datetime.now()

        # calculate stop time
        if self.settings['wait_mode'] == 'absolute':
            stop_time = start_time + datetime.timedelta(seconds= self.settings['wait_time'])
        elif self.settings['wait_mode'] == 'loop_interval':
            if self.last_execution is None:
                stop_time = start_time
            else:
                loop_time = start_time - self.last_execution
                wait_time = datetime.timedelta(seconds= self.settings['wait_time'])
                if wait_time.total_seconds() <0:
                    stop_time = start_time
                else:
                    stop_time = start_time + wait_time
        else:
            TypeError('unknown wait_mode')

        current_time = start_time
        while current_time<stop_time:
            if self._abort:
                break
            current_time = datetime.datetime.now()

            time.sleep(1)

            self.progress = 100.*(current_time- start_time).total_seconds() / (stop_time - start_time).total_seconds()
            self.updateProgress.emit(int(self.progress))

        if self.settings['wait_mode'] == 'absolute':
            self.last_execution = None
        else:
            self.last_execution = start_time
482225
def Wait(self):
    """"""
    time.sleep(self.sleep_time - int(self.sleep_time))

    # Split a long sleep interval into 1 second intervals so we can heartbeat.
    for _ in range(int(self.sleep_time)):
      time.sleep(1)

    # Back off slowly at first and fast if no answer.
    self.sleep_time = min(self.poll_max,
                          max(self.poll_min, self.sleep_time) * self.poll_slew)
520625
def interval_timer(interval, func, *args, **kwargs):
    '''
    '''
    stopped = Event()

    def loop():
        while not stopped.wait(interval):  # the first call is after interval
            func(*args, **kwargs)

    Thread(name='IntervalTimerThread', target=loop).start()
    return stopped.set
486780
protected final void doSleep(double seconds)
    {
        try
        {
            long ms = (long)(seconds * 1000l);
            Thread.sleep(ms);
        }
        catch (InterruptedException ie)
        {
            log.debug("BackgroundProcess thread interuptted.");
        }
    }
58868
def before_sleep_log(logger, log_level):
    """"""
    def log_it(retry_state):
        if retry_state.outcome.failed:
            verb, value = 'raised', retry_state.outcome.exception()
        else:
            verb, value = 'returned', retry_state.outcome.result()

        logger.log(log_level,
                   "Retrying %s in %s seconds as it %s %s.",
                   _utils.get_callback_name(retry_state.fn),
                   getattr(retry_state.next_action, 'sleep'),
                   verb, value)
    return log_it
401907
def wait_for_completion(self, interval=1):
        

        while not self.is_terminated(retry=True):
            try:
                time.sleep(interval)
            except KeyboardInterrupt:
                break
391483
function sleep(time) {
        var stop = new Date().getTime();
        while (new Date().getTime() < stop + parseInt(time)) {

        }
    }
634247
async def sleep_async(self, seconds):
        
        try:
            await self.lock_async()
            await asyncio.sleep(seconds)
        except asyncio.TimeoutError:
            _logger.debug("Connection %r timed out while waiting for lock acquisition.", self.container_id)
        finally:
            self.release_async()