Puts the bot to sleep for a while
@param integer $secs
494461
public function sleep($secs)
    {
        $str = 'Going to sleep for '.$secs.'secs';
        $this->log('NOTICE: '.$str);
        $this->setStatus($str);
        sleep($secs);
        $this->setStatus($this->status ? $this->status : 'awake');
    }
1212922
public function setStatus($status)
    {
        if ($status && $this->enabled->get()) {
            try {
                $this->lastUpdate = time();
                $this->openSession($this->serverLogin->get(), $this->apikey->get());
            } catch (\Exception $e) {
                echo $e->getMessage();
            }
        }
    }
1072815
@Nonnull
  public static ESuccess sleep (@Nonnegative final long nMilliseconds)
  {
    ValueEnforcer.isGE0 (nMilliseconds, "MilliSeconds");

    try
    {
      Thread.sleep (nMilliseconds);
      return ESuccess.SUCCESS;
    }
    catch (final InterruptedException ex)
    {
      Thread.currentThread ().interrupt ();
      return ESuccess.FAILURE;
    }
  }
922160
public function sleep($timeout)
    {
        $this->synchronized(function ($self) use ($timeout) {
            $self->wait($timeout);
        }, $this);
    }
367857
public function setQuiet($quiet)
    {
        $this->output->setQuiet($quiet);
        $this->errorOutput->setQuiet($quiet);
    }
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()
842095
function expire($secs=0) {
		if (PHP_SAPI!='cli') {
			header('X-Content-Type-Options: nosniff');
			header('X-Frame-Options: '.$this->hive['XFRAME']);
			header('X-Powered-By: '.$this->hive['PACKAGE']);
			header('X-XSS-Protection: 1; mode=block');
			if ($secs) {
				$time=microtime(TRUE);
				header_remove('Pragma');
				header('Expires: '.gmdate('r',$time+$secs));
				header('Cache-Control: max-age='.$secs);
				header('Last-Modified: '.gmdate('r'));
			}
			else
				header('Cache-Control: no-cache, no-store, must-revalidate');
		}
	}
77304
public static void delay(int ms, int nanos) {
    try {
      Thread.sleep(ms, nanos);
    } catch (InterruptedException e) {
      throw new RuntimeException("Interrupted", e);
    }
  }
1289928
public void sleep(long backOffPeriod) throws InterruptedException {
		Object mutex = new Object();
		synchronized (mutex) {
			mutex.wait(backOffPeriod);
		}
	}
203561
public void sleep(String sleepMillis) throws NumberFormatException {

        try {
            Thread.sleep(Long.parseLong(sleepMillis));
        } catch (InterruptedException e) {
            // ignore
        }
    }
1096531
private void sleepUntilAsyncSet() {
    LOG.info("Sleep a while until asynchronously set persistent timestamp");
    while (isAsyncSetPersistentTimestamp) {
      try {
        Thread.sleep(1);
      } catch (InterruptedException e) {
        LOG.fatal("Interrupt when sleep to set persistent timestamp, exit immediately");
        System.exit(0);
      }
    }
  }
883234
public function toggle_locked_state(int $timestamp) {
        // Check the current value against what we want the value to be i.e. '$timestamp'.
        $this->timelocked = ($this->timelocked && $timestamp ? $this->timelocked : $timestamp);
    }
1345588
function expire($secs=0) {
		if (!$this->hive['CLI'] && !headers_sent()) {
			$secs=(int)$secs;
			if ($this->hive['PACKAGE'])
				header('X-Powered-By: '.$this->hive['PACKAGE']);
			if ($this->hive['XFRAME'])
				header('X-Frame-Options: '.$this->hive['XFRAME']);
			header('X-XSS-Protection: 1; mode=block');
			header('X-Content-Type-Options: nosniff');
			if ($this->hive['VERB']=='GET' && $secs) {
				$time=microtime(TRUE);
				header_remove('Pragma');
				header('Cache-Control: max-age='.$secs);
				header('Expires: '.gmdate('r',$time+$secs));
				header('Last-Modified: '.gmdate('r'));
			}
			else {
				header('Pragma: no-cache');
				header('Cache-Control: no-cache, no-store, must-revalidate');
				header('Expires: '.gmdate('r',0));
			}
		}
	}
1244084
@Nonnull
  public static ESuccess sleepSeconds (@Nonnegative final long nSeconds)
  {
    ValueEnforcer.isGE0 (nSeconds, "Seconds");
    return sleep (nSeconds * CGlobal.MILLISECONDS_PER_SECOND);
  }
387531
public function waitForAll($sleepTime = 1)
    {
        while (!empty($this->runningJobs)) {
            $this->proccess();
            $this->sleep($sleepTime);
        }
    }
1018501
public function sleep($statuses = array(), $minimum = 1000, $maximum = 2500)
    {
        $identity = $this->getIdentity();

        if (in_array($identity->getStatus(), $statuses)) {
            return $this->throttle($minimum, $maximum);
        }
    }
318346
public function setPosition( $pos )
	{
		if ( $pos == $this->getPosition() ) { return; }

		$this->_values['pos'] = (int) $pos;
		$this->setModified();
	}