src/Command.php
public function timeout(int $timeout): bool
    {
        $application = $this->getApplication();
        if (!$application instanceof Application) {
            return false;
        }

        # Check if the application is currently allowing time limiting or not
        if (!$application->timeLimit()) {
            return false;
        }

        $endTime = $this->startTime + $timeout;

        return (time() > $endTime);
    }
public function timeout(int $timeout): bool
    {
        $application = $this->getApplication();
        if (!$application instanceof Application) {
            return false;
        }

        # Check if the application is currently allowing time limiting or not
        if (!$application->timeLimit()) {
            return false;
        }

        $endTime = $this->startTime + $timeout;

        return (time() > $endTime);
    }
Check if the passed time has elapsed since the command start.

@param int $timeout The number of seconds the command is allowed to run for

@return bool True if the time has been exceeded and the command should end