PHP sleep() 函数
定义和用法
sleep() 函数延迟代码执行若干秒。
语法sleep(seconds)
seconds 必需。以秒计的暂停时间。
返回值
若成功,返回 0,否则返回 false。
错误/异常
如果指定的描述 seconds 是负数,该函数将生成一个 E_WARNING。
例子
<"<br />"; //暂停 10 秒 sleep(10);//重新开始 echo date('h:i:s'); "htmlcode"><"<br />"; //延迟 10 描述 usleep(10000000); //再次开始 echo date('h:i:s'); "color: #ff0000">当你需要程序暂停执行几秒可以用 sleepint sleep ( int $seconds ) 程序暂停$seconds秒后执行。
Returns zero on success, or FALSE on error.成功返回0,错误返回false。
If the call was interrupted by a signal, sleep() returns a non-zero value. On Windows, this value will always be 192 (the value of the WAIT_IO_COMPLETION constant within the Windows API). On other platforms, the return value will be the number of seconds left to sleep.
如果调用被信号中断,该函数返回一个非0值。在windows平台上,这个值总是192(这个值是Windows API中等待IO完成WAIT_IO_COMPLETION的常量值)。其它平台返回值为sleep还没有执行的秒数。
If the specified number of seconds is negative, this function will generate a E_WARNING.
如果参数为负值,则函数生产一个警告错误.
当你需要程序暂停执行1秒一下时间的时候你可以用usleep
void usleep ( int $micro_seconds )
Delays program execution for the given number of micro seconds.
usleep参数是微秒,且无返回值。
当你需要程序执行单位更小(小于微秒)可以用
time_nanosleep() - Delay for a number of seconds and nanoseconds
如果你希望程序暂停执行到某个时间点,你可以用
time_sleep_until()- Make the script sleep until the specified time
PHP,sleep,usleep
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
- 韩红2005-精选[首版][WAV+CUE]
- 张敬轩.2004-A.M/P.M【几何文化】【WAV+CUE】
- 范文芳1999-真心话电影原声带[HYPE][WAV+CUE]
- 袁培华.1990-我写不出一首情歌给我最爱的你【可登】【WAV+CUE】
- 群星.2007-歌林10年流行岁月12CD【歌林】【WAV+CUE】
- 软硬天师.2006-LONG.TIME.NO.SEE【金牌大风】【WAV+CUE】
- 卓依娜姆《美人谋 网剧影视原声带》[FLAC/分轨][162.27MB]
- 国风大师纯音系列《蒋倩 :古筝演奏家》1CD[MP3][160.7MB]
- 国风大师纯音系列《王中山古筝》1CD[MP3][519MB]
- 徐玮1986-走自己的路[台湾复刻版][WAV+CUE]
- 黄思婷2004-情缘[豪记唱片][WAV+CUE]
- 群星《左耳·听见爱情》星文唱片[WAV+CUE]
- 陈美玲.1987-孤单的心【EMI百代】【WAV+CUE】
- 黄乙玲.2005-甲你作伴【亚律音乐】【WAV+CUE】
- 张雨生.1997-口是心非【丰华】【WAV+CUE】