Get request timeout
@return int Request timeout in milliseconds
163967
public function getTimeout() {
        if($this->timeout)
            return $this->timeout;

        $timeout = 0;
        foreach ($this->requests as $r) {
            $timeout += $r->getTimeout();
        }
        return $timeout;
    }
317798
public Integer getTimeout()
   {
      if (childNode.getTextValueForPatternName("timeout") != null && !childNode.getTextValueForPatternName("timeout").equals("null")) {
         return Integer.valueOf(childNode.getTextValueForPatternName("timeout"));
      }
      return null;
   }
224357
public function setRequestTimeout($timeout)
    {
        if (!is_int($timeout) || $timeout < 0) {
            throw new Exception("Invalid value supplied for request timeout: $timeout");
        }

        $this->requestTimeout = $timeout;
        return $this;
    }
357730
public function wait_for_response($requestId, $timeoutMs = 0) {

        if (!isset($this->_requests[$requestId])) {
            throw new \Exception('Invalid request id given');
        }

        // If we already read the response during an earlier call for different id, just return it
        if ($this->_requests[$requestId]['state'] == self::REQ_STATE_OK
            || $this->_requests[$requestId]['state'] == self::REQ_STATE_ERR
            ) {
            return $this->_requests[$requestId]['response'];
        }

        if ($timeoutMs > 0) {
            // Reset timeout on socket for now
            $this->set_ms_timeout($timeoutMs);
        } else {
            $timeoutMs = $this->_readWriteTimeout;
        }

        // Need to manually check since we might do several reads none of which timeout themselves
        // but still not get the response requested
        $startTime = microtime(true);

        do {
            $resp = $this->readPacket();

            if ($resp['type'] == self::STDOUT || $resp['type'] == self::STDERR) {
                if ($resp['type'] == self::STDERR) {
                    $this->_requests[$resp['requestId']]['state'] = self::REQ_STATE_ERR;
                }
                $this->_requests[$resp['requestId']]['response'] .= $resp['content'];
            }
            if ($resp['type'] == self::END_REQUEST) {
                $this->_requests[$resp['requestId']]['state'] = self::REQ_STATE_OK;
                if ($resp['requestId'] == $requestId) { 
                    break;
                }
            }
            if (microtime(true) - $startTime >= ($timeoutMs * 1000)) {
                // Reset
                $this->set_ms_timeout($this->_readWriteTimeout);
                throw new \Exception('Timed out');
            }
        } while ($resp);

        if (!is_array($resp)) {
            $info = stream_get_meta_data($this->_sock);

            // We must reset timeout but it must be AFTER we get info
            $this->set_ms_timeout($this->_readWriteTimeout);

            if ($info['timed_out']) {
                throw new TimedOutException('Read timed out');
            }

            if ($info['unread_bytes'] == 0
                    && $info['blocked']
                    && $info['eof']) {
                throw new ForbiddenException('Not in white list. Check listen.allowed_clients.');
            }

            throw new \Exception('Read failed');
        }

        // Reset timeout
        $this->set_ms_timeout($this->_readWriteTimeout);

        switch (ord($resp['content']{4})) {
            case self::CANT_MPX_CONN:
                throw new \Exception('This app can\'t multiplex [CANT_MPX_CONN]');
                break;
            case self::OVERLOADED:
                throw new \Exception('New request rejected; too busy [OVERLOADED]');
                break;
            case self::UNKNOWN_ROLE:
                throw new \Exception('Role value not known [UNKNOWN_ROLE]');
                break;
            case self::REQUEST_COMPLETE:
                return $this->_requests[$requestId]['response'];
        }
    }
1336009
protected TimeoutId requestTimeout(final long delay, final TimeUnit unit) {
        return requestTimeout(delay, unit, null, null);
    }
873515
public int get_timeout_millis(final Connection connection) throws DevFailed {

		build_connection(connection);

		// Check if TACO device
		if (connection.url.protocol == TACO) {
	    	return connection.taco_device.get_rpc_timeout();
		} else {
	    	// Else TANGO device
	    	return connection.getDev_timeout();
		}
    }
1190
private function getTimeout(): ?float
    {
        if (! is_numeric($this->option('timeout'))) {
            throw new \InvalidArgumentException('The timeout value must be a number.');
        }

        $timeout = (float) $this->option('timeout');

        return $timeout > 0 ? $timeout : null;
    }
417415
public function timeout($timeout = null)
    {
        // Return value
        if (empty($timeout)) {
            return $this->timeout;
        }

        // Set value
        $this->timeout = $timeout;

        return $this;
    }
188223
public function setTimeout($timeout)
    {
        $timeout = is_scalar($timeout) ? (int) $timeout : 0;

        return $timeout < 1
            ? $this->timeout
            : $this->timeout = $timeout;
    }
496426
public function get($url, array $params = [], $timeout = null,
        array $headers = []
    ) {
        if ($params) {
            $query = $this->createQueryString($params);
            if (strpos($url, '?') !== false) {
                $url .= '&' . $query;
            } else {
                $url .= '?' . $query;
            }
        }
        $client
            = $this->createClient($url, \Zend\Http\Request::METHOD_GET, $timeout);
        if ($headers) {
            $client->setHeaders($headers);
        }
        return $this->send($client);
    }
1327635
public function wait($timeout = 60)
    {
        $timeoutMicro = $timeout !== null ? microtime(true) + (float)$timeout : null;
        while ($this->isRunning()) {
            if ($timeout !== null && microtime(true) >= $timeoutMicro) {
                return null;
            }
            usleep(1000);
        }

        return $this->getExitCode();
    }
306800
private long getTimeoutMillis(String type, Duration timeout) {
    return timeout != null ? timeout.toMillis() : computeTimeoutMillis(type);
  }
776804
public function getTotalRedirectionTime()
    {
        return array_reduce(iterator_to_array($this->getCommands()), function ($time, $value) {
            $time += $value['curl']['redirectTime'];

            return $time;
        });
    }
321314
public function getLastError(): string
    {
        if ($this->isConnected() && $this->socket) {
            $err = @socket_last_error($this->socket);
            if ($err) {
                $err = socket_strerror($err);
            }
            if (!$err) {
                $err = 'Unknown error';
            }
            return $err;
        } else {
            return 'Not connected';
        }
    }
265283
protected function doConnect()
    {
        $host = $this->getParam('host');
        $port = $this->getParam('port');
        $timeout = $this->getParam('timeout');

        return $this->retry(function () use ($host, $port, $timeout) {
            $res = @ftp_connect($host, $port, $timeout);

            if (false === $res) {
                throw new \RuntimeException("Couldn't connect to: $host:$port");
            }

            return $res;
        });
    }
564794
public function getTimeout() : ?int 
    {
        if ( ! $this->hasTimeout()) {
            $this->setTimeout($this->getDefaultTimeout());
        }
        return $this->timeout;
    }
615426
public function getTimeoutHeader()
    {
        $header = $this->server->httpRequest->getHeader('Timeout');

        if ($header) {
            if (0 === stripos($header, 'second-')) {
                $header = (int) (substr($header, 7));
            } elseif (0 === stripos($header, 'infinite')) {
                $header = LockInfo::TIMEOUT_INFINITE;
            } else {
                throw new DAV\Exception\BadRequest('Invalid HTTP timeout header');
            }
        } else {
            $header = 0;
        }

        return $header;
    }