Set timeouts
@param  integer $read Read timeout in seconds
@param  integer $write Write timeout in seconds
@return void
969425
public function setTimeouts($read, $write)
    {
        $this->timeoutRead = $read;
        $this->timeoutWrite = $write;
        if ($this->bev) {
            $this->bev->setTimeouts($this->timeoutRead, $this->timeoutWrite);
        }
    }
91740
public function setReadTimeout(int $timeout)
    {
        if ($timeout < -1) {
            throw new RedisException('Timeout values less than -1 are not accepted.');
        }
        $this->readTimeout = $timeout;
        if ($this->connected) {
            $timeout = $timeout <= 0 ? 315360000 : $timeout; // Ten-year timeout
            \stream_set_blocking($this->redis, true);
            \stream_set_timeout($this->redis, (int) \floor($timeout), ($timeout - \floor($timeout)) * 1000000);
        }

        return $this;
    }
592637
public void setResponseTimeout(int timeout) {
        try {
            getConnection().setReadTimeout(timeout);
        } catch (Exception e) {
            Modbus.log().warning(e.getLocalizedMessage());
        }
    }
1047200
protected function select($read, $write, $error, $timeout)
    {
        if ($this->haveSwoole)
        {
            return swoole_client_select($read, $write, $error, $timeout);
        }

        $t_sec = (int)$timeout;
        $t_usec = (int)(($timeout - $t_sec) * 1000 * 1000);

        foreach ($read as $o)
        {
            $_read[] = $o->getSocket();
        }
        foreach ($write as $o)
        {
            $_write[] = $o->getSocket();
        }
        foreach ($error as $o)
        {
            $_error[] = $o->getSocket();
        }

        if ($this->haveSockets)
        {
            return socket_select($_read, $_write, $_error, $t_sec, $t_usec);
        }
        else
        {
            return stream_select($_read, $_write, $_error, $t_sec, $t_usec);
        }
    }
212500
public function setSendTimeout($timeout)
    {
        $this->sendTimeoutSec_ = floor($timeout / 1000);
        $this->sendTimeoutUsec_ =
            ($timeout - ($this->sendTimeoutSec_ * 1000)) * 1000;
    }
1154372
protected function write(string $string, int $writer = Output::STANDARD): void
	{
		$this->output->writeLn($string, $writer);
	}
496070
public function setTimeout($timeout)
    {
        if (is_string($timeout) && ctype_digit($timeout)) {
            $timeout = (int) $timeout;
        } elseif (!is_int($timeout)) {
            throw new \RuntimeException('Unable to set timeout.');
        }
        $this->timeout = $timeout;

        return $this;
    }
1067199
public function setWriteBuffer($size)
    {
        if (!is_resource($this->fp)) {
            return $this->raiseError('not connected');
        }

        $returned = stream_set_write_buffer($this->fp, $size);
        if ($returned === 0) {
            return true;
        }

        return $this->raiseError('Cannot set write buffer.');
    }
227866
private function onWritable()
    {
        $bytesWritten = @\fwrite($this->socket, $this->writeBuffer);

        if ($bytesWritten === false) {
            $this->close();
            return;
        }

        if ($bytesWritten === 0) {
            return;
        }

        $this->timeoutCache->renew($this->id);

        if ($bytesWritten !== \strlen($this->writeBuffer)) {
            $this->writeBuffer = \substr($this->writeBuffer, $bytesWritten);
            return;
        }

        $this->writeBuffer = "";

        Loop::disable($this->writeWatcher);
        $deferred = $this->writeDeferred;
        $this->writeDeferred = null;
        $deferred->resolve();
    }
983506
public function timeout($ms)
    {
        $this->timeout = (integer) $ms;
        $this->riakCursor->timeout($ms);
        return $this;
    }
902968
def _set_timeout(self, msecs: int) -> None:
        """"""
        if self._timeout is not None:
            self.io_loop.remove_timeout(self._timeout)
        self._timeout = self.io_loop.add_timeout(
            self.io_loop.time() + msecs / 1000.0, self._handle_timeout
        )
1007665
public function setTimeout($timeout) {
        $this->_timeout = (int) $timeout;
        if ( ! is_null($this->_varnishConn)) {
            stream_set_timeout($this->_varnishConn, $this->_timeout);
        }
        return $this;
    }
296197
private function streamSelect(array &$read, array &$write, $timeout)
    {
        if ($read || $write)
        {
            $except = null;

            return @stream_select($read, $write, $except, $timeout === null ? null : 0, $timeout);
        }

        usleep($timeout);

        return 0;
    }
1340565
def set_tx_timeout(self, channel, timeout):
        
        UcanSetTxTimeout(self._handle, channel, int(timeout * 1000))
1281007
public function setWriteConcern($w, $timeout = 10000)
    {
        if (!$this->getMongoDB()->setWriteConcern($w, (int) $timeout)) {
            throw new Exception('Error setting write concern');
        }

        return $this;
    }
1266583
public void readLock(EntityKey key, int timeout) {
		ReadWriteLock lock = getLock( key );
		Lock readLock = lock.readLock();
		acquireLock( key, timeout, readLock );
	}
610718
public void setReadTimeout(int readTimeout) {
		this.client = this.client.newBuilder()
				.readTimeout(readTimeout, TimeUnit.MILLISECONDS)
				.build();
	}