Implements the NailgunProtocol.TimeoutProvider interface.
14454
def maybe_timeout_options(self):
    """"""
    if self._exit_timeout_start_time:
      return NailgunProtocol.TimeoutOptions(self._exit_timeout_start_time, self._exit_timeout)
    else:
      return None
1055751
public AndroidTerminateApplicationOptions withTimeout(Duration timeout) {
        checkArgument(!checkNotNull(timeout).isNegative(), "The timeout value cannot be negative");
        this.timeout = timeout;
        return this;
    }
113529
public void setTimeout(Duration timeout) {

        LettuceAssert.notNull(timeout, "Timeout must not be null");
        LettuceAssert.isTrue(!timeout.isNegative(), "Timeout must be greater or equal 0");

        this.timeout = timeout;
    }
1045273
def _reset_timeout(self):
        """"""
        if self._timeout:
            self._timeout.cancel()
        self._timeout = self.loop.call_later(self.client.timeout,
                                             self.transport.close)
1207674
public void setTimeout(int timeout) {
        if (config.delivery instanceof HttpDelivery) {
            ((HttpDelivery) config.delivery).setTimeout(timeout);
        }
        if (config.sessionDelivery instanceof HttpDelivery) {
            ((HttpDelivery) config.sessionDelivery).setTimeout(timeout);
        }
    }
620148
@Override
    public IPromise<T> onTimeout(Consumer timeoutHandler) {
        return then( (r,e) -> {
            if ( e == Timeout.INSTANCE ) {
                timeoutHandler.accept(e);
            }
        });
    }
892622
private void setTimeoutOnSelenium() {
		executeCommand("setTimeout", new String[] { "" + this.timeout });
        WebDriver.Timeouts timeouts = getWebDriver().manage().timeouts();
        timeouts.setScriptTimeout(this.timeout, TimeUnit.MILLISECONDS);
        timeouts.pageLoadTimeout(this.timeout, TimeUnit.MILLISECONDS);
	}
413890
public void close(long timeout, TimeUnit timeUnit) {

        disable();

        for (GetJobsAction<K, V> getJobsAction : actions) {
            getJobsAction.close(timeout, timeUnit);
        }

        if (reconnectTrigger != null) {
            reconnectTrigger.unsubscribe();
            reconnectTrigger = null;
        }
    }
1035380
public void processTimeout(TimeoutEvent arg0) {
    synchronized (listeners) {
      Iterator<SipListener> iter = listeners.iterator();
      while (iter.hasNext() == true) {
        SipListener listener = (SipListener) iter.next();
        listener.processTimeout(arg0);
      }
    }
  }
1184477
protected synchronized void resetTimeout() {
        if (timeoutTask != null)
            timeoutTask.cancel();
        if (timeoutMillis == 0 || !timeoutEnabled)
            return;
        timeoutTask = new TimerTask() {
            @Override
            public void run() {
                timeoutOccurred();
            }
        };
        timeoutTimer.schedule(timeoutTask, timeoutMillis);
    }
827785
def set_timeout(self, timeout):
        

        if timeout > 0:
            self.timeout = timeout
            self.server.request("screen_set %s timeout %i" % (self.ref, (self.timeout * 8)))
1163660
function Timeout(clusterUtils, name, func, delay) {
    this._clusterUtils = clusterUtils;
    this._func = func;

    this.lockKey = util.format('ClusterUtils:setTimeout:Lock:%s', name);
    this.timeoutId = setTimeout(_runIfLocked.bind(this), delay);
}
1367787
public Retryer<R> timeout(long duration, TimeUnit timeUnit, ExecutorService executor) {
        return timeout(null == executor
                ? new SimpleTimeLimiter() : new SimpleTimeLimiter(executor), duration, timeUnit);
    }
679218
@SneakyThrows
	public void gracefullyShutdown(Duration timeout) {
		logger.info("Shutting down...");

		if(!shuttingDown) {
			synchronized (this) {
				shuttingDown = true;
				threadPoolExecutor.shutdown();
			}

			// stops jobs that have not yet started to be executed
			for(Job job : jobStatus()) {
				Runnable runningJob = job.runningJob();
				if(runningJob != null) {
					threadPoolExecutor.remove(runningJob);
				}
				job.status(JobStatus.DONE);
			}
			synchronized (launcherNotifier) {
				launcherNotifier.set(false);
				launcherNotifier.notify();
			}
		}

		threadPoolExecutor.awaitTermination(timeout.toMillis(), TimeUnit.MILLISECONDS);
	}
368927
def timeout(self, timeout):
        """"""
        self._proxy_json._timeout = timeout
        self._proxy_http._timeout = timeout
349269
public void setReadTimeout(int timeout) {
		Assert.isTrue(timeout >= 0, "Timeout must be a non-negative value");
		this.socketTimeout = timeout;
		setLegacySocketTimeout(getHttpClient(), timeout);
	}
264186
def _start_timeout():
    """"""
    global _timeout

    LOGGER.debug('Adding a new timeout in %i ms', _timeout_interval)
    _maybe_stop_timeout()
    _timeout = ioloop.IOLoop.current().add_timeout(
        ioloop.IOLoop.current().time() + _timeout_interval / 1000.0,
        _on_timeout)