public function checkTimeout()
    {
        if (self::STATUS_STARTED !== $this->status) {
            return;
        }

        if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) {
            $this->stop(0);

            throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_GENERAL);
        }

        if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) {
            $this->stop(0);

            throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_IDLE);
        }
    }
public function checkTimeout()
    {
        if (self::STATUS_STARTED !== $this->status) {
            return;
        }

        if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) {
            $this->stop(0);

            throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_GENERAL);
        }

        if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) {
            $this->stop(0);

            throw new ProcessTimedOutException($this, ProcessTimedOutException::TYPE_IDLE);
        }
    }
public function checkTimeout ( ) { if ( self :: STATUS_STARTED !== $ this -> status ) { return ; } if ( null !== $ this -> timeout && $ this -> timeout < microtime ( true ) - $ this -> starttime ) { $ this -> stop ( 0 ) ; throw new ProcessTimedOutException ( $ this , ProcessTimedOutException :: TYPE_GENERAL ) ; } if ( null !== $ this -> idleTimeout && $ this -> idleTimeout < microtime ( true ) - $ this -> lastOutputTime ) { $ this -> stop ( 0 ) ; throw new ProcessTimedOutException ( $ this , ProcessTimedOutException :: TYPE_IDLE ) ; } }
Performs a check between the timeout definition and the time the process started.

In case you run a background process (with the start method), you should
trigger this method regularly to ensure the process timeout

@throws ProcessTimedOutException In case the timeout was reached
Performs a check between the timeout definition and the time the process started .