note 109561 added to function.microtime
| From: | maxim at inbox dot ru | Date: | Sat, 28 Jul 2012 16:09:27 +0000 |
| Subject: | note 109561 added to function.microtime | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-189441@lists.php.net to get a copy of this message | ||
I have fixed bug with second function calling, sorry but we have to delete 2 previous msgs. The
correct solution is:
<?php
function get_mt() {static $mt; return $mt ? microtime(true)-$mt.$mt=null : $mt=microtime(true);}
?>
----
Server IP: 195.54.192.44
Probable Submitter: 95.221.32.63
----
Manual Page -- http://www.php.net/manual/en/function.microtime.php
Edit -- https://master.php.net/note/edit/109561
Del: integrated -- https://master.php.net/note/delete/109561/integrated
Del: useless -- https://master.php.net/note/delete/109561/useless
Del: bad code -- https://master.php.net/note/delete/109561/bad+code
Del: spam -- https://master.php.net/note/delete/109561/spam
Del: non-english -- https://master.php.net/note/delete/109561/non-english
Del: in docs -- https://master.php.net/note/delete/109561/in+docs
Del: other reasons-- https://master.php.net/note/delete/109561
Reject -- https://master.php.net/note/reject/109561
Search -- https://master.php.net/manage/user-notes.php