请告诉我为什么要使用" sleep()"在PHP的pthreads中

时间:2016-07-26 08:55:58

标签: php pthreads

enter image description here

请告诉我为什么要使用" sleep()"在PHP的pthreads中

2 个答案:

答案 0 :(得分:1)

睡眠用于延迟程序执行给定的秒数。在phthreads。

答案 1 :(得分:0)

sleep()函数将当前脚本的执行延迟指定的秒数。

<html>
<body>

<?php
echo date('h:i:s') . "<br>";

//sleep for 10 seconds
sleep(10);

//start again
echo date('h:i:s');
?>

</body>
</html>