..
The sleep function is used to delay the execution of a script.
This function accepts a single parameter (numerical value integer) that represents the number of seconds you want to delay the execution.
For example:
<? Php
/ / Current time
echo date ('h: i: s').
"<br/>";
/ / Suspend execution for 10 seconds
Sleep (10);
/ / Current time stamp again
echo date ('h: i: s');
?>
The result is returned to me when I write is:
11:42:21 11:42:31See also usleep (delay the execution of a script in milliseconds)
| |
Linux (Course)
Complete guide to open-source system. From 49 €. |
| |
MySQL (Course)
Management of open-source database. From 39 €. |
| |
PHP (Course)
Full course for creating dynamic Web sites. From 49 €. |