Reply to Re: unix time stamp as float instead of integer?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация