Lines Matching defs:timeout

62     private $timeout;
139 * @param int|float|null $timeout The timeout in seconds or null to disable
143 public function __construct(array $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
164 $this->setTimeout($timeout);
186 * @param int|float|null $timeout The timeout in seconds or null to disable
192 public static function fromShellCommandline(string $command, string $cwd = null, array $env = null, $input = null, ?float $timeout = 60)
194 $process = new static([], $cwd, $env, $input, $timeout);
456 * @throws ProcessTimedOutException In case the timeout was reached
527 * @throws LogicException if an idle timeout is set
535 throw new LogicException('Output cannot be disabled while an idle timeout is set.');
912 * @param int|float $timeout The timeout in seconds
913 * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9)
917 public function stop(float $timeout = 10, int $signal = null)
919 $timeoutMicro = microtime(true) + $timeout;
993 * Gets the process timeout in seconds (max. runtime).
999 return $this->timeout;
1003 * Gets the process idle timeout in seconds (max. time since last output).
1013 * Sets the process timeout (max. runtime) in seconds.
1015 * To disable the timeout, set this value to null.
1019 * @throws InvalidArgumentException if the timeout is negative
1021 public function setTimeout(?float $timeout)
1023 $this->timeout = $this->validateTimeout($timeout);
1029 * Sets the process idle timeout (max. time since last output) in seconds.
1031 * To disable the timeout, set this value to null.
1036 * @throws InvalidArgumentException if the timeout is negative
1038 public function setIdleTimeout(?float $timeout)
1040 if (null !== $timeout && $this->outputDisabled) {
1041 throw new LogicException('Idle timeout cannot be set while the output is disabled.');
1044 $this->idleTimeout = $this->validateTimeout($timeout);
1188 * Performs a check between the timeout definition and the time the process started.
1191 * trigger this method regularly to ensure the process timeout
1193 * @throws ProcessTimedOutException In case the timeout was reached
1201 if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) {
1400 * Validates and returns the filtered timeout.
1402 * @throws InvalidArgumentException if the given timeout is a negative number
1404 private function validateTimeout(?float $timeout): ?float
1406 $timeout = (float) $timeout;
1408 if (0.0 === $timeout) {
1409 $timeout = null;
1410 } elseif ($timeout < 0) {
1411 throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.');
1414 return $timeout;