public function ProcessBuilder::setTimeout in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/ProcessBuilder.php \Symfony\Component\Process\ProcessBuilder::setTimeout()
Sets the process timeout.
To disable the timeout, set this value to null.
Parameters
float|null $timeout:
Return value
Throws
File
- vendor/
symfony/ process/ ProcessBuilder.php, line 196
Class
- ProcessBuilder
- Process builder.
Namespace
Symfony\Component\ProcessCode
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;
}