Home >Backend Development >PHP Tutorial >Introduction to the usage of usleep() function in php
This article introduces the usage of usleep() function in PHP. Friends who need it can refer to it.
Definition and usage usleep() function delays code execution for a number of microseconds. Grammar usleep(microseconds) Parameter Description microseconds required. Pause time in microseconds. Return value No return value. Tips and Notes Note: Before PHP 5, this function did not work on Windows systems. Note: One microsecond is equal to one millionth of a second. For example: <?php echo date('h:i:s') . "<br />"; //延迟 10 描述 usleep(10000000); //再次开始 echo date('h:i:s'); ?> Output: 09:23:14 09:23:24 |