think\Process::checkTimeout PHP Méthode

checkTimeout() public méthode

是否超时
public checkTimeout ( )
    public function checkTimeout()
    {
        if ($this->status !== self::STATUS_STARTED) {
            return;
        }
        if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) {
            $this->stop();
            throw new ProcessTimeoutException($this, ProcessTimeoutException::TYPE_GENERAL);
        }
        if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) {
            $this->stop();
            throw new ProcessTimeoutException($this, ProcessTimeoutException::TYPE_IDLE);
        }
    }