Sets the process timeout.
To disable the timeout, set this value to null.
float|null:
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;
}