How to pause a script just for a fraction of a second in PHP using the SLEEP() function?

前端 未结 4 1113
渐次进展
渐次进展 2020-12-11 16:43
sleep(1);   #waits/sleeps for one second then continue running the script

Q1. How to make this 1/100 of a second? which of these work: 0,01

4条回答
  •  猫巷女王i
    2020-12-11 17:11

    Use usleep in which you can pass in microseconds,

    so for your case you can call usleep(10000) to sleep for 1/100 of a second.

提交回复
热议问题