waiting while real state equal config state
        Args:
            timeout - specify how long, in seconds, a command can take before server times out.

        return True if operation success otherwise False
776953
def waiting_config_state(self, timeout=300):
        
        t_start = time.time()
        while not self.check_config_state():
            if time.time() - t_start > timeout:
                return False
            time.sleep(0.1)
        return True
496266
def _wait(self, timeout=None):
        
        r, w, x = select.select([self._stick_file], [], [], timeout)
        return bool(r)
1169016
def until_state(self, desired_state, timeout=None):
        
        return self._state.until_state(desired_state, timeout=timeout)
1211615
async def wait_until_ready(
        self, timeout: Optional[float] = None, no_raise: bool = False
    ) -> bool:
        
        if self.node.ready.is_set():
            return True

        try:
            return await self.node.wait_until_ready(timeout=timeout)
        except asyncio.TimeoutError:
            if no_raise:
                return False
            else:
                raise
1230034
private static boolean waitForServerDown(int port, long timeout) {
    long start = System.currentTimeMillis();
    while (true) {
      try {
        Socket sock = new Socket("localhost", port);
        try {
          OutputStream outstream = sock.getOutputStream();
          outstream.write("stat".getBytes());
          outstream.flush();
        } finally {
          sock.close();
        }
      } catch (IOException e) {
        return true;
      }

      if (System.currentTimeMillis() > start + timeout) {
        break;
      }
      try {
        Thread.sleep(250);
      } catch (InterruptedException e) {
        // ignore
      }
    }
    return false;
  }
8197
def set_wait(timeout = nil)
      timeout = @core.default_wait if timeout.nil?
      @driver.manage.timeouts.implicit_wait = timeout
    end
919501
def result(self, timeout=None):
        
        if not self._done.wait(timeout):
            raise Timeout('timeout waiting for future')
        # No more state changes after _done is set so no lock needed.
        if self._state == self.S_EXCEPTION:
            raise compat.saved_exc(self._result)
        return self._result
1297943
def wait(self, timeout=None):
    

    t_start = time.clock()
    if not wait_for_condition(self, lambda s: s._tasks == 0, timeout):
      raise Timeout
387473
def _flush_timeout(self, timeout):
        
        future = tornado.concurrent.Future()
        yield self._send_ping(future)
        try:
            result = yield tornado.gen.with_timeout(
                timedelta(seconds=timeout), future)
        except tornado.gen.TimeoutError:
            # Set the future to False so it can be ignored in _process_pong,
            # and try to remove from the list of pending pongs.
            future.set_result(False)
            for i, pong_future in enumerate(self._pongs):
                if pong_future == future:
                    del self._pongs[i]
                    break
            raise
        raise tornado.gen.Return(result)
1235155
def wait_running(self, timeout=None):
        

        flag = self._running.wait(timeout)

        if flag is False:
            raise TimeoutExpiredError("Timeout waiting for thread to start running")
509196
def wait_end interval, timeout
      Timeout.timeout(timeout) do
          exec = Execution::find(@session, @id)
        until exec.status != :running do
          exec = Execution::find(@session, @id)
          sleep interval
        end
      end
      self.output
    end
132815
def wait_for_service_available(container, url, timeout):
    
    start = time.time()
    remaining = timeout
    while True:
        remaining = start + timeout - time.time()
        if remaining < 0:
            raise ServiceTimeout
        try:
            response = get(url,
                timeout=min(remaining, REQUEST_TIMEOUT_SECONDS))
            if 500 <= response.status_code < 600:
                return False
            return True
        except (ConnectionError, Timeout):
            pass
        if not inspect_container(container)['State']['Running']:
            return False

        remaining = start + timeout - time.time()
        delay = max(0, min(RETRY_DELAY_SECONDS, remaining))
        time.sleep(delay)

    raise ServiceTimeout
288571
def wait_until(name, state, timeout=300):
    '''
    
    '''
    start_time = time.time()
    node = show_instance(name, call='action')
    while True:
        if node['state'] == state:
            return True
        time.sleep(1)
        if time.time() - start_time > timeout:
            return False
        node = show_instance(name, call='action')
47422
public long waiting(long timeout, boolean modifyTimeout)
  {
    // Add code when running remotely
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
    {
      SibTr.entry(tc, "waiting");
      SibTr.exit(tc, "waiting", Long.valueOf(timeout));
    }

    return timeout;
  }
184919
def wait(self, timeout=None):
        
        self.__stopped.wait(timeout)
        return self.__stopped.is_set()
925962
def wait(self, state, timeout=-1):
        

        if isinstance(state, str):
            state = state.upper()

        return _lxc.Container.wait(self, state, timeout)
1164076
public void waitUntilComplete(long timeout) {
        long base=System.currentTimeMillis();
        long now=0;
        lock.lock();
        try {
            while(processing || count.get() > 0) {
                long delay=timeout-now;
                if(delay <= 0)
                    break;
                try {
                    processing_done.await(delay, TimeUnit.MILLISECONDS);
                    now=System.currentTimeMillis()-base;
                }
                catch(InterruptedException e) {
                }
            }
        }
        finally {
            lock.unlock();
        }
    }