public function ProcessBuilder::setTimeout

Sets the process timeout.

To disable the timeout, set this value to null.

Parameters

float|null:

Return value

ProcessBuilder

Throws

InvalidArgumentException

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/ProcessBuilder.php, line 129

Class

ProcessBuilder
Process builder.

Namespace

Symfony\Component\Process

Code

public function setTimeout($timeout) {
  if (null === $timeout) {
    $this->timeout = null;
    return $this;
  }
  $timeout = (double) $timeout;
  if ($timeout < 0) {
    throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.');
  }
  $this->timeout = $timeout;
  return $this;
}