note 40197 deleted from function.microtime by irchtml

From: Date: Wed, 25 Feb 2004 14:27:21 +0000
Subject: note 40197 deleted from function.microtime by irchtml
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-65725@lists.php.net to get a copy of this message
Note Submitter: correct microtime ---- This refers to the last (incorrect) note, that confused me a bit: microtime kyong 14-Feb-2004 08:36 please correct getmicrotime() like this, <?php function getmicrotime() { list($usec, $sec) = explode(" ", microtime()); return ((float)$usec/1E6 + (float)$sec); } ?> The description of the function states that: '... BOTH portions of the string are returned in units of seconds'. That means '$usec' is represented as the remainder of one second (it allready was divided by 1000000). So '$usec/1E6' (dividing $usec by 1000000 a second time) is NOT correct! I may be wrong, then please delete me ;) Sorry my English.

« previous php.notes (#65725) next »