Sleep for a short period

@param count
979548
private void sleeper(int count) {
        try {
            Thread.sleep(retryDelay * (long) count);
        } catch (InterruptedException ex) {
            LOG.trace("Sleep interrupted", ex);
        }
    }
1288985
public static boolean sleep(Number timeout, TimeUnit timeUnit) {
		try {
			timeUnit.sleep(timeout.longValue());
		} catch (InterruptedException e) {
			return false;
		}
		return true;
	}
1101155
def responsive_sleep(self, seconds, wait_reason=''):
        """"""
        for x in xrange(int(seconds)):
            if (self.config.wait_log_interval and
                    not x % self.config.wait_log_interval):
                self.config.logger.debug(
                    '%s: %dsec of %dsec' % (wait_reason, x, seconds)
                )
            self.quit_check()
            time.sleep(1.0)
1033023
def skip(self, count):
        '''
        
        '''
        self._get_ready()
        skipped = 0
        for i in range(count):
            if self.mutate():
                skipped += 1
            else:
                break
        return skipped
812703
public static final RetryPolicy retryUpToMaximumCountWithFixedSleep(int maxRetries, long sleepTime, TimeUnit timeUnit) {
    return new RetryUpToMaximumCountWithFixedSleep(maxRetries, sleepTime, timeUnit);
  }
33771
function(count) {
      count = count || this.INIT_COUNT;
      jsl.status(this.name + ' x ' + count);
      this.running = true;
      var me = this;
      setTimeout(function() {me._run(count);}, 200);
    }
831287
protected void sleep(long ms) throws IOException {
    try {
      Thread.sleep(ms);
    } catch (InterruptedException e) {
      LOG.error("Interrupted when sleeping", e);
      Thread.currentThread().interrupt();
      throw new IOException("Received interruption");
    }
  }
25528
public static void sleep(int milliseconds) {

        try {
            Thread.sleep(milliseconds);
        } catch (InterruptedException e) {
            QuickUtils.log.e("Interrupted exception", e);
        }
    }
1289928
public void sleep(long backOffPeriod) throws InterruptedException {
		Object mutex = new Object();
		synchronized (mutex) {
			mutex.wait(backOffPeriod);
		}
	}
1272530
public static <E> void times(final int count, final Supplier<E> function) {
        for (int index = 0; index < count; index += 1) {
            function.get();
        }
    }
1281737
public DailyTimeIntervalScheduleBuilder endingDailyAfterCount (final int count)
  {
    ValueEnforcer.isGT0 (count, "Count");

    if (m_aStartTimeOfDay == null)
      throw new IllegalArgumentException ("You must set the startDailyAt() before calling this endingDailyAfterCount()!");

    final Date today = new Date ();
    final Date startTimeOfDayDate = m_aStartTimeOfDay.getTimeOfDayForDate (today);
    final Date maxEndTimeOfDayDate = TimeOfDay.hourMinuteAndSecondOfDay (23, 59, 59).getTimeOfDayForDate (today);
    final long remainingMillisInDay = maxEndTimeOfDayDate.getTime () - startTimeOfDayDate.getTime ();
    long intervalInMillis;
    if (m_eIntervalUnit == EIntervalUnit.SECOND)
      intervalInMillis = m_nInterval * CGlobal.MILLISECONDS_PER_SECOND;
    else
      if (m_eIntervalUnit == EIntervalUnit.MINUTE)
        intervalInMillis = m_nInterval * CGlobal.MILLISECONDS_PER_MINUTE;
      else
        if (m_eIntervalUnit == EIntervalUnit.HOUR)
          intervalInMillis = m_nInterval * DateBuilder.MILLISECONDS_IN_DAY;
        else
          throw new IllegalArgumentException ("The IntervalUnit: " + m_eIntervalUnit + " is invalid for this trigger.");

    if (remainingMillisInDay - intervalInMillis <= 0)
      throw new IllegalArgumentException ("The startTimeOfDay is too late with given Interval and IntervalUnit values.");

    final long maxNumOfCount = (remainingMillisInDay / intervalInMillis);
    if (count > maxNumOfCount)
      throw new IllegalArgumentException ("The given count " +
                                          count +
                                          " is too large! The max you can set is " +
                                          maxNumOfCount);

    final long incrementInMillis = (count - 1) * intervalInMillis;
    final Date endTimeOfDayDate = new Date (startTimeOfDayDate.getTime () + incrementInMillis);

    if (endTimeOfDayDate.getTime () > maxEndTimeOfDayDate.getTime ())
      throw new IllegalArgumentException ("The given count " +
                                          count +
                                          " is too large! The max you can set is " +
                                          maxNumOfCount);

    final Calendar cal = PDTFactory.createCalendar ();
    cal.setTime (endTimeOfDayDate);
    final int hour = cal.get (Calendar.HOUR_OF_DAY);
    final int minute = cal.get (Calendar.MINUTE);
    final int second = cal.get (Calendar.SECOND);

    m_aEndTimeOfDay = TimeOfDay.hourMinuteAndSecondOfDay (hour, minute, second);
    return this;
  }
1076644
public void addSequence(List<Long> sleeps) {
		sleepHistogram.addAll(sleeps);
		sleepSequences.add(new SleepSequence(sleeps));
	}
1040104
private static void sleepFor(int time, TimeUnit units) {
        try {
            LOG.trace("Sleeping for {} {}", time, units.toString());
            Thread.sleep(units.toMillis(time));
        } catch (InterruptedException e) {
            // no-op
        }
    }
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()
1159295
public static boolean sleep(Number millis) {
		if (millis == null) {
			return true;
		}

		try {
			Thread.sleep(millis.longValue());
		} catch (InterruptedException e) {
			return false;
		}
		return true;
	}
298151
def shift(self, count=1):
        
        if self:
            self._index = (self._index + count) % len(self)
        else:
            self._index = 0
351261
private synchronized void sleep(long waitNanos) throws InterruptedException {
        while (waitNanos > 0 && isRunning()) {
            long start = System.nanoTime();
            TimeUnit.NANOSECONDS.timedWait(this, waitNanos);
            waitNanos -= System.nanoTime() - start;
        }
    }