note 55345 deleted from function.imap-headers by didou

From: Date: Sun, 14 Jan 2007 23:41:04 +0000
Subject: note 55345 deleted from function.imap-headers by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121671@lists.php.net to get a copy of this message
Note Submitter: me at _spam_koenpasman dot nl ---- A reaction to consult at pmkmedia dot com: The negative results you are getting are due to your usage of microtime(). microtime() returns a string like this: 0.52234000 1122834868 First, the microseconds, then a space, and then a Unix Timestamp. A function like this corrects this: <?php function getmicrotime() { list($usec, $sec) = explode(' ', microtime()); return ((float)$usec + (float)$sec); } $first = getmicrotime(); /* code.. */ echo 'parsetime: '.(getmicrotime()-$first); ?> Then you won't get any negative parsetimes.

« previous php.notes (#121671) next »