技术库 技术手册 字体库 知识点 词汇表 联系我们
内容搜索   
本站最新推出网站制作字体库。
当前位置:WEB技术知识资源库(www.cn-web.com) .: PHP技术 .: 基础教程 .: php中microtime()函数

php中microtime()函数


microtime — 返回当前 Unix 微秒数和时间戳(以空格分隔)

说明

mixed microtime ( [bool $get_as_float] )
 
用 microtime() 对脚本的运行计时
<?php
/**
 * Simple function to replicate PHP 5 behaviour
 */
function microtime_float
()
{
    list(
$usec, $sec) = explode(" ", microtime
());
    return ((float)
$usec + (float)$sec
);
}

$time_start = microtime_float
();

// Sleep for a while
usleep(100
);

$time_end = microtime_float
();
$time = $time_end - $time_start
;

echo
"Did nothing in $time secondsn"
;
?>



Google
 

对此文章打分评级

用户评论

增加评论
此文章还没有任何评论!
网站地图 - 知识词汇 - 全文检索 - 广告服务 - 帮助中心 - 联系我们
.:www.cn-web.com
网站技术开发联盟之WEB开发技术知识库
联系人:老韩(QQ:5679551)
晋ICP备07003487号