You are here

public function Process::setTimeout in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/process/Process.php \Symfony\Component\Process\Process::setTimeout()

Sets the process timeout (max. runtime).

To disable the timeout, set this value to null.

Parameters

int|float|null $timeout The timeout in seconds:

Return value

self The current Process instance

Throws

InvalidArgumentException if the timeout is negative

1 call to Process::setTimeout()
Process::__construct in vendor/symfony/process/Process.php
Constructor.

File

vendor/symfony/process/Process.php, line 884

Class

Process
Process is a thin wrapper around proc_* functions to easily start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function setTimeout($timeout) {
  $this->timeout = $this
    ->validateTimeout($timeout);
  return $this;
}