弧
mixed
microtime ( [bool get_as_float] )
microtime() 瞷ノ Unix
丁耊の稬计セㄧ计度や穿 gettimeofday()
╰参㊣笆╰参ノ
璝狦㊣ぃ盿匡把计セㄧ计 "msec sec"
Α﹃ㄤい sec 琌 Unix じ0:00:00 January 1,
1970 GMT癬瞷计msec 琌稬场だ﹃ㄢ场だ常琌虫
璝狦倒 get_as_float 把计ㄤ单基
TRUEmicrotime() 盢疊翴计
猔:
get_as_float 把计琌 PHP 5.0.0 穝
ㄒ 1. ノ 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 seconds\n"; ?>
|
|
把ǎ time()