Tag: equals class CPU style note Code strong log Integer
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 note the unit of the parameter, assuming that it pauses 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 ()