Pause code Execution in PHP for a certain time, there are two functions can be implemented, one is sleep (), the other is usleep (), their parameters are an integer value. Sleep () is how many seconds are paused, and usleep () is how many microseconds are paused.
Note:the usleep () unit is in microseconds, 1 seconds = 1000 milliseconds, 1 milliseconds = 1000 microseconds, or 1 microseconds equals one out of 10,000 seconds.
If you want to use only usleep () in your program to pause the number of milliseconds, be sure to pay attention to the units of the parameter, assuming that you pause for 50 milliseconds, you should use Usleep (50000)instead of Usleep (50).
In addition, this pause can not be hundred percent accurate, with the system scheduling, CPU clock cycle and so on have a certain relationship.
PHP pause function The difference between sleep () and Usleep ()