Sets the maximum amount of time in seconds before the buffered logs are
automatically flushed upon adding the next log entry.

@param integer $seconds Time in seconds. Use zero or negative value to
disable the time limit.
483530
public static function setLogFlushTimeLimit($seconds) {
    if (!is_int($seconds)) {
      throw new \InvalidArgumentException(
          'Seconds must be an integer but was ' . self::typeOrClass($seconds));
    }
    self::$flush_time_limit = $seconds;
  }
1237917
public function put($key, $value, $minutes)
    {
        if ($minutes instanceof \Datetime) {
            $seconds = $minutes->getTimestamp() - time();
        } else {
            $seconds = $minutes * 60;
        }
        $this->redis->setex($this->decorateKey($key), $seconds, $value);
    }
33331
public function setTransmitTimeout($seconds = null)
    {
        if (is_integer($seconds)) {
            $this->_txtimeout = $seconds;
        } else {
            $this->_txtimeout = self::DEF_TX_RX_TIMEOUT;
        }
        return $this->_txtimeout;
    }
34785
public function forceCache($seconds = HOUR) {
		$response = $this->Controller->getResponse();

		$response = $response->withHeader('Cache-Control', 'public, max-age=' . $seconds)
			->withHeader('Last-modified', gmdate('D, j M Y H:i:s', time()) . ' GMT')
			->withHeader('Expires', gmdate('D, j M Y H:i:s', time() + $seconds) . ' GMT');

		$this->Controller->setResponse($response);
	}
1142851
public function setStreamTimeout($seconds)
    {
        if ($this->isConnected() === true) {
            if (is_numeric($seconds) === true) {
                try {
                    $timeout      = number_format($seconds, 3);
                    $seconds      = floor($timeout);
                    $microseconds = (($timeout - $seconds) * 1000);
                    return stream_set_timeout($this->streamSocket, $seconds, $microseconds);
                } catch (\Exception $e) {
                    return false;
                }
            }
        }

        return false;
    }
1195605
public static function setTime($newLimit = 0)
    {
        $newLimit = (int)$newLimit;

        self::iniSet('set_time_limit', $newLimit);
        self::iniSet('max_execution_time', $newLimit);
        if (self::isFunc('set_time_limit')) {
            set_time_limit($newLimit);
        }
    }
864083
public function setInterval(int $seconds, ?int $microseconds = null): void
    {
        if (func_num_args() === 1) {
            $microseconds = $seconds;
            $seconds      = 0;
        }

        Assert::notNull($microseconds, 'Cannot set $microseconds to null. Set to 0 for no microseconds.');
        parent::setInterval($seconds, $microseconds);

        $this->seconds      = $seconds;
        $this->microseconds = $microseconds;
    }
1051022
private static function keepSecondsWithinTimeout($seconds, $timedOut)
    {
        if (is_null($timedOut)) {
            return $seconds;
        }
        $remainingSeconds = max($timedOut - microtime(true), 0);
        return min($remainingSeconds, $seconds);
    }
1356664
public function setMinMax($min,$max=null)
    {
       $this->min = $min; 
       $this->max = $max; 
    }
663971
public function setex($key, $seconds, $value) {
        return $this->returnCommand(['SETEX'], $key, [$key, $seconds, $value]);
    }
1110913
public function plusSeconds(int $seconds) : Duration
    {
        if ($seconds === 0) {
            return $this;
        }

        return new Duration($this->seconds + $seconds, $this->nanos);
    }
161528
public function setDuration($seconds)
    {
        $seconds = round($seconds, 3);

        if ($seconds < 0 || $seconds > 999999.999) {
            throw new InvalidArgumentException('Duration seconds must be in range 0-999999.999');
        }

        $this->duration = $seconds;

        return $this;
    }
737194
public function deleteOldLogs(int $max_age_in_seconds): void
    {
        $timestamp = Carbon::now()->subSeconds($max_age_in_seconds);

        DB::table('log')
            ->whereIn('log_type', ['error', 'media'])
            ->where('log_time', '<', $timestamp)
            ->delete();
    }
914454
public static function limitRefresh($seconds = 5)
    {
        $cookie_name   = 'limitRefresh_' . md5($_SERVER['PHP_SELF']);
        $cache_control = isset($_SERVER['HTTP_CACHE_CONTROL']) ? $_SERVER['HTTP_CACHE_CONTROL'] : '';
        if (isset($_COOKIE[$cookie_name]) && ($_COOKIE[$cookie_name] + $seconds > time()) && $cache_control != 'no-cache') {
            header('HTTP/1.1 304 Not Modified');
            exit;
        } else {
            $expire = $_SERVER['REQUEST_TIME'] + $seconds;
            setcookie($cookie_name, $_SERVER['REQUEST_TIME'], $expire + 3600, '/', $_SERVER['SERVER_NAME']);
            header('Last-Modified: ' . date('D,d M Y H:i:s', $expire) . ' GMT');
            header('Expires: ' . date('D,d M Y H:i:s', $expire) . ' GMT');
        }
    }
903688
public function setTimeout($seconds, $microseconds = 0)
    {
        if($resource = $this->getResource()) {
            return stream_set_timeout($resource, $seconds, $microseconds);
        }

        return false;
    }
1083437
public function setReceiveMessageWaitTimeSeconds(int $seconds = null): void
    {
        if (null == $seconds) {
            unset($this->attributes['ReceiveMessageWaitTimeSeconds']);
        } else {
            $this->attributes['ReceiveMessageWaitTimeSeconds'] = $seconds;
        }
    }
107663
public function setCurlConnectTimeout($seconds)
    {
        if (!is_numeric($seconds) || $seconds < 0) {
            throw new \InvalidArgumentException('Connect timeout value must be numeric and a non-negative number.');
        }

        $this->curlConnectTimeout = $seconds;
        return $this;
    }