PHP - usleep
Trieda
Metóda - usleep
(PHP 4, PHP 5, PHP 7)
The usleep() function stops the script for a given number of
microseconds.
Procedurálne
- function usleep (int $micro_seconds) : void
Parametre
| Názov | Dátový typ | Predvolená hodnota | Popis |
|---|---|---|---|
| $micro_seconds | int | The number of microseconds to delay the script. |
Mávratovej hodnoty
Vracia: void
The function doesn't return anything.
Príklady
<?php
echo date('H:i:s');
echo ' - falling asleep...<br />';
usleep(2000000); // Stopping the script for 2000000 microseconds = 2 seconds
echo 'I am awake! It is ';
echo date('H:i:s');
Súvisiace manuály
- function set_time_limit (int $seconds) : bool
- function sleep (int $seconds) : int
