Posted by Andy Hassall on 05/24/05 02:01
On 23 May 2005 15:50:15 -0700, lkrubner@geocities.com wrote:
>I just noticed this when I was catching up on old posts:
>
>
>>Senator Jay Billington Bulworth Feb 3, 6:09 am
>>function getmicrotime(){
>> list($usec, $sec) = explode(' ', microtime());
>> return ((float)$usec + (float)$sec);
>>}
>
>$sec should be a Unix timestamp, which is an integer. What is the point
>of casting it to a float?
Read: http://uk2.php.net/microtime
And observe:
$ echo '<?php print microtime() ?>' | ./php -q
0.24315700 1116889261
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
[Back to original message]
|