Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Delay execution in microseconds
usleep(int $microseconds): void
        $animation = new LoadingAnimation($io);

        do {

            
$animation->tick('Retrieving the stack');

            
usleep(100 1000);

        } while (
$serverlessInfo->isRunning());

        
$animation->clear();
        $dockerPull->start();

        do {

            
$animation->tick('Retrieving the latest version of the dashboard');

            
usleep(100 1000);

        } while (
$dockerPull->isRunning());

        
$animation->clear();

        if (! 
$dockerPull->isSuccessful()) {
        $process->start();

        do {

            
$animation->tick('Starting the dashboard');

            
usleep(100 1000);

            
$serverOutput $process->getOutput() . $process->getErrorOutput();

            
$hasStarted = (strpos($serverOutput'Development Server') !== false);

        } while (
$process->isRunning() && ! $hasStarted);
        $elapsed 0;



        while (! 
$this->isReady()) {

            
usleep($wait);

            
$elapsed += $wait;



            if (
$elapsed $timeout) {
        $timeout 1000000// 1 sec

        
$elapsed 0;

        while (
posix_getpgid($pid) !== false) {

            
usleep($wait);

            
$elapsed += $wait;

            if (
$elapsed $timeout) {

                throw new 
Exception('Timeout while waiting for PHP-FPM to stop');
        if (isset($event['warmer']) && $event['warmer'] === true) {



            
usleep(10000); // 10ms

            
return ['Lambda is warm'];

        }
    {

        
$tries 0;

        while (! 
self::isListening() && ++$tries $maxTries) {

            
usleep(100000);

        }

        if (! 
self::isListening()) {

            throw new 
\RuntimeException('Unable to contact node.js server');