note 75148 deleted from function.microtime by tularis

From: Date: Sun, 22 Jun 2008 12:07:01 +0000
Subject: note 75148 deleted from function.microtime by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140670@lists.php.net to get a copy of this message
Note Submitter: aharsani at gmail dot com ---- instead of suggested: function microtime_float() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec + (float)$sec); } i have to use: function microtime_float() { list($usec, $sec) = explode(" ", microtime()); $fusec = (float)$usec; if($fusec > 0) { $fusec -= floor($fusec); } return $fusec + time(); } reason: microtime() randomly return time which is different then time() +-15sec...

« previous php.notes (#140670) next »