Difference among sleep() and usleep() in PHP

前端 未结 5 1518
执笔经年
执笔经年 2021-01-07 17:35

Can any body explain me what is the difference among sleep() and usleep() in PHP.

I have directed to use following scripts to do chat appli

5条回答
  •  一个人的身影
    2021-01-07 18:14

    usleep() is used to delay execution in "microseconds" while sleep() is used to delay execution in seconds. So usleep(25000) is 0.025 seconds.

    Is there any difference between the two?
    

提交回复
热议问题