note 40197 added to function.microtime
| From: | correctmicrotime at rn2 dot php dot net | Date: | Wed, 25 Feb 2004 02:12:43 +0000 |
| Subject: | note 40197 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-65679@lists.php.net to get a copy of this message | ||
This refers to the last (incorrect) note, that confused me a bit:
microtime
kyong
14-Feb-2004 08:36
please correct getmicrotime() like this,
<?php
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec/1E6 + (float)$sec);
}
?>
The description of the function states that:
'... BOTH portions of the string are returned in units of seconds'.
That means '$usec' is represented as the remainder of one second (it allready was divided
by 1000000).
So '$usec/1E6' (dividing $usec by 1000000 a second time) is NOT correct!
I may be wrong, then please delete me ;)
Sorry my English.
----
Manual Page -- http://www.php.net/manual/en/function.microtime.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+40197
Delete -- http://master.php.net/manage/user-notes.php?action=delete+40197&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+40197&report=yes
Search -- http://master.php.net/manage/user-notes.php