getTimeout() public method

Gets the process timeout (max. runtime).
public getTimeout ( ) : float | null
return float | null The timeout in seconds or null if it's disabled
示例#1
0
 public function testNullTimeout()
 {
     $p = new Process('');
     $p->setTimeout(10);
     $p->setTimeout(null);
     $this->assertNull($p->getTimeout());
 }
示例#2
0
 /**
  * @param Process $process
  *
  * @return string
  */
 public function serialize(Process $process)
 {
     return json_encode(['command' => $process->getCommandLine(), 'timeout' => $process->getTimeout()]);
 }