private function Process::validateTimeout in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/process/Process.php \Symfony\Component\Process\Process::validateTimeout()
Validates and returns the filtered timeout.
Parameters
int|float|null $timeout:
Return value
float|null
Throws
InvalidArgumentException if the given timeout is a negative number
2 calls to Process::validateTimeout()
- Process::setIdleTimeout in vendor/
symfony/ process/ Process.php - Sets the process idle timeout (max. time since last output).
- Process::setTimeout in vendor/
symfony/ process/ Process.php - Sets the process timeout (max. runtime).
File
- vendor/
symfony/ process/ Process.php, line 1345
Class
- Process
- Process is a thin wrapper around proc_* functions to easily start independent PHP processes.
Namespace
Symfony\Component\ProcessCode
private function validateTimeout($timeout) {
$timeout = (double) $timeout;
if (0.0 === $timeout) {
$timeout = null;
}
elseif ($timeout < 0) {
throw new InvalidArgumentException('The timeout value must be a valid positive integer or float number.');
}
return $timeout;
}