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

        do {

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

            usleep(100 * 1000);

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

        $animation->clear();
<?php         $dockerPull->start();

        do {

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

            usleep(100 * 1000);

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

        $animation->clear();

        if (! $dockerPull->isSuccessful()) {
<?php         $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);
<?php         $elapsed = 0;



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

            usleep($wait);

            $elapsed += $wait;



            if ($elapsed > $timeout) {
<?php         $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');
<?php         if (isset($event['warmer']) && $event['warmer'] === true) {



            usleep(10000); // 10ms

            return ['Lambda is warm'];

        }
<?php     {

        $tries = 0;

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

            usleep(100000);

        }

        if (! self::isListening()) {

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