if ($endTime) { $remainingSeconds =
$endTime -
microtime(true
);
if ($remainingSeconds <
$idleTime) { $idleTime =
$remainingSeconds;
} } $idleTime =
max(1,
min((int) $idleTime, 15
));
sleep($idleTime);
if ($this->
shouldRestart($startTime)) { $this->shouldStop = true;
$output->
writeln(sprintf('Scheduled task runner stopped due to time limit of %ds reached',
$timeLimit));
} if ($endTime &&
$endTime <
microtime(true
)) { $this->shouldStop = true;
$output->
writeln(sprintf('Scheduled task runner stopped due to time limit of %ds reached',
$timeLimit));
} if ($memoryLimit &&
memory_get_usage() >
$memoryLimit) { $this->shouldStop = true;