note 109561 deleted from function.microtime by danbrown
| From: | danbrown@php.net | Date: | Mon, 30 Jul 2012 15:48:17 +0000 |
| Subject: | note 109561 deleted from function.microtime by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189478@lists.php.net to get a copy of this message | ||
Note Submitter: maxim at inbox dot ru
----
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);}
?>