Wrapper method for MongoCursor::maxTimeMS().

@see http://php.net/manual/en/mongocursor.maxtimems.php
@param integer $ms
@return $this
503749
public function maxTimeMS($ms)
    {
        $this->maxTimeMS = (integer) $ms;
        $this->mongoCursor->maxTimeMS($this->maxTimeMS);
        return $this;
    }
628100
public function skip($num)
    {
        $num = (integer) $num;
        $this->skip = $num;
        $this->mongoCursor->skip($num);
        return $this;
    }
263058
public function setMax(float $max) : self
    {
        $this->getField()->addAttribute('max', (string) $max);

        return $this;
    }
1247391
public function between($min, $max, $includeMin = true, $includeMax = true) {
        if (!$this->_isValid) {
            return $this;
        }

        if ($this->_unsafeVar < $min) {
            $this->_isValid = false;
        } else if ($this->_unsafeVar > $max) {
            $this->_isValid = false;
        } else if ($this->_unsafeVar == $min && !$includeMin) {
            $this->_isValid = false;
        } else if ($this->_unsafeVar == $max && !$includeMax) {
            $this->_isValid = false;
        }
        return $this;
    }
667163
public function setExpire($expire)
    {
        if (!$expire instanceof DateTime) {
            if (is_integer($expire)) {
                $expire = (new DateTime())->setTimestamp($expire);
            } else {
                $expire = new DateTime($expire);
            }
        }
        $this->expire = $expire;

        return $this;
    }
1287076
public function setMaxTime(QtiDuration $maxTime = null)
    {
        // Prevent to get 0s durations stored.
        if (is_null($maxTime) === false && $maxTime->getSeconds(true) === 0) {
            $maxTime = null;
        }

        $this->maxTime = $maxTime;
    }
1091456
protected function setTimestamp($seconds)
	{
		if ( ! is_numeric($seconds) || $seconds < 0)
		{
			throw new \InvalidArgumentException('The seconds value should be a positive integer.');
		}
		
		$this->timestamp = (float) $seconds;
		
		return $this;
	}
335020
private function set_ms_timeout($timeoutMs) {
        if (!$this->_sock) {
            return false;
        }
        return stream_set_timeout($this->_sock, floor($timeoutMs / 1000), ($timeoutMs % 1000) * 1000);
    }
373838
public function setConnectTimeout ($ms) {
    if (defined('CURLOPT_CONNECTTIMEOUT_MS')) {
      $this->addCurlOption(CURLOPT_CONNECTTIMEOUT_MS, $ms);

    } else {
      // older versions of php/libcurl don't have the sub-second timeout
      // functionality. Convert to nearest whole seconds not less than 1.
      $this->addCurlOption(CURLOPT_CONNECTTIMEOUT, max(1, round($ms / 1000)));
    }
    return $this;
  }
336474
public function setExpiry(int $expires = null):AccessToken{
		$now = time();

		if($expires!== null){
			$expires =  intval($expires);
		}

		$this->expires = self::EOL_UNKNOWN;

		if($expires === 0 || $expires === self::EOL_NEVER_EXPIRES){
			$this->expires = self::EOL_NEVER_EXPIRES;
		}
		elseif($expires > $now){
			$this->expires = $expires;
		}
		elseif($expires > 0 && $expires < self::EXPIRY_MAX){
			$this->expires = $now + $expires;
		}

		return $this;
	}
1316966
public function expiresAfter($time)
    {
        if ($time instanceof \DateInterval) {
            $time = (int) $time->format("%r%s");
        }

        $this->expiration = time() + $time;

        return $this;
    }
744612
public function & SetExpirationSeconds ($seconds = 0) {
		/** @var $this \MvcCore\Session */
		if ($seconds > 0) 
			static::$meta->expirations[$this->__name] = static::$sessionStartTime + $seconds;
		return $this;
	}
1188172
public function setMaxResults($maxResults)
    {
        $this->_maxResults = $maxResults;
        $this->_state      = self::STATE_DIRTY;

        return $this;
    }
255236
private static function sequence($ms)
    {
        return FP::reduce(
            function (Generator $acc, Generator $elem) {
                return $acc->bindGen(function ($xs) use ($elem) {
                    return $elem->bindGen(function ($y) use ($xs) {
                        return self::pureGen(FP::push($xs, $y));
                    });
                });
            },
            $ms,
            self::pureGen([])
        );
    }
639609
public function timings($metrics)
    {
        // add |ms to values
        $data = [];
        foreach ($metrics as $metric => $timing) {
            $data[$metric] = $timing.'|ms';
        }

        return $this->send($data);
    }
838589
private function createDateTime($seconds = null)
    {
        if (null === $seconds) {
            $seconds = time();
        }

        if ($this->mongo instanceof \MongoDB\Client) {
            return new \MongoDB\BSON\UTCDateTime($seconds * 1000);
        }

        return new \MongoDate($seconds);
    }
905483
public function setMax($value)
    {
        $this->max = $value === null ? null : (int) $value;

        return $this;
    }