sleep for a number of seconds (nicer than microseconds!)
sleep does not relinquish its monitors
486780
protected final void doSleep(double seconds)
    {
        try
        {
            long ms = (long)(seconds * 1000l);
            Thread.sleep(ms);
        }
        catch (InterruptedException ie)
        {
            log.debug("BackgroundProcess thread interuptted.");
        }
    }
501605
def sleep():
    
    if loop_duration == 0:
        raise BeatError("call beat.set_rate() before calling sleep")
    if loop_start_time == None:
        raise BeatError("call beat.true() before calling sleep")
    td = datetime.datetime.now() - loop_start_time
    duration_to_sleep = loop_duration - td.total_seconds()
    if duration_to_sleep < 0:
        raise BeatError("skipping sleep. Too much work!")
    time.sleep(duration_to_sleep)
814708
public static void sleep(long durationMillis) {
		try {
			Thread.sleep(durationMillis);
		} catch (InterruptedException e) {
			Thread.currentThread().interrupt();
		}
	}
366019
def sleep(self, unique_id, delay, configs=None):
    
    self.pause(unique_id, configs)
    time.sleep(delay)
    self.resume(unique_id, configs)
988616
def get_display_sleep():
    '''
    
    '''
    ret = salt.utils.mac_utils.execute_return_result(
        'systemsetup -getdisplaysleep')
    return salt.utils.mac_utils.parse_return(ret)
875508
def Sleep(self, timeout):
    """"""
    if self.nanny_controller:
      self.nanny_controller.Heartbeat()

    # Split a long sleep interval into 1 second intervals so we can heartbeat.
    while timeout > 0:
      time.sleep(min(1., timeout))
      timeout -= 1
      # If the output queue is full, we are ready to do a post - no
      # point in waiting.
      if self._out_queue.Full():
        return

      if self.nanny_controller:
        self.nanny_controller.Heartbeat()
726634
def sleep
      current_time = ::ROS::Time.now
      if @last_time > current_time
        @last_time = current_time
      end
      elapsed = current_time - @last_time
      time_to_sleep = @sleep_duration - elapsed
      if time_to_sleep.to_sec > 0.0
        time_to_sleep.sleep
      end
      @last_time = @last_time + @sleep_duration

      # detect time jumping forwards, as well as loops that are
      # inherently too slow
      if (current_time - @last_time).to_sec > @sleep_duration.to_sec * 2
        @last_time = current_time
      end
      nil
    end
956734
def Wait(self, timeout):
    """"""
    time.sleep(timeout - int(timeout))

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

      if self.heart_beat_cb:
        self.heart_beat_cb()
1260021
def monitor(self):
        
        # NOTE: This blocks; it is up to the calling code to call it
        #       in a separate thread.

        # Sleep for however long we should be waiting.
        time.sleep(self._settings.max_latency)

        _LOGGER.debug("Monitor is waking up")
        return self._commit()
1061699
@Nonnull
  public static ESuccess sleep (@Nonnull final TimeValue aTimeValue)
  {
    ValueEnforcer.notNull (aTimeValue, "TimeValue");
    return sleep (aTimeValue.getAsMillis ());
  }
1129715
function nextRepo() {
      console.log('Sleeping for 1 second...');
      // avoid rate throttling
      global.clearTimeout(timer);
      timer = global.setTimeout(stepRepo, 100);
    }
858846
void compute_sleep_time() {
	if (works.size() > 0) {
	    double next, after_d, diff;
	    WorkItem item = (WorkItem) works.elementAt(0);

	    next = item.wake_up_date.tv_sec + (double) item.wake_up_date.tv_usec / 1000000;
	    after_d = after.tv_sec + (double) after.tv_usec / 1000000;
	    diff = next - after_d;

	    if (diff < 0) {
		if (Util.fabs(diff) < Tango_DISCARD_THRESHOLD) {
		    sleep = 0;
		} else {
		    while (diff < 0 && Util.fabs(diff) > Tango_DISCARD_THRESHOLD) {
			Util.out5.println(diff + " > " + Tango_DISCARD_THRESHOLD);
			Util.out5.println("Discard one elt !!!!!!!!!!!!!");
			item = (WorkItem) works.elementAt(0);
			compute_new_date(item.wake_up_date, item.update);
			insert_in_list(item);
			works.remove(0);

			item = (WorkItem) works.elementAt(0);
			next = item.wake_up_date.tv_sec + (double) item.wake_up_date.tv_usec
				/ 1000000;
			diff = next - after_d;
		    }
		    if (Util.fabs(diff) < Tango_DISCARD_THRESHOLD) {
			sleep = 0;
		    } else {
			sleep = (long) (diff * 1000);
		    }
		}
	    } else {
		sleep = (long) (diff * 1000);
	    }
	    Util.out5.println("Sleep for : " + sleep);
	}
    }
1196320
def _delay(self):
        """"""
        if not self.next_scheduled:
            self.next_scheduled = self.clock_func() + self.interval
            return
        while True:
            current = self.clock_func()
            if current >= self.next_scheduled:
                extratime = current - self.next_scheduled
                self.next_scheduled = current + self.interval - extratime
                return
            delay_amt = self.next_scheduled - current
            #Call for 0, because that might be meaningful to sleep_func.
            if self.allow_negative_sleep or delay_amt >= 0: 
                self.sleep_func(self.next_scheduled - current)
239741
public static void sleep(int millis) {
		long end = System.currentTimeMillis() + millis;
		boolean interrupted = Thread.interrupted();
		int remain = millis;
		while (remain > 0) {
			try {
				Thread.sleep(remain);
				break;
			} catch (InterruptedException e) {
				interrupted = true;
				remain = (int) (end - System.currentTimeMillis());
			}
		}
		if (interrupted) {
			Thread.currentThread().interrupt();
		}
	}
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()
897697
def sleep(self, seconds):
        
        until = time.time() + seconds
        try:
            while True:
                self._service_futures([], until)
        except TimeoutError:
            return
272766
function() {
      var t = this;

      // Detach any prior monitor
      if (t.monitor) {
        t.monitor.off('change', t.onMonitorChange, t);
        delete t.monitor;
      }
    }