original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: 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
docstring_tokens: Performs a check between the timeout definition and the time the process started .