note 51605 deleted from function.microtime by tularis

From: Date: Sun, 22 Jun 2008 12:15:30 +0000
Subject: note 51605 deleted from function.microtime by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-140706@lists.php.net to get a copy of this message
Note Submitter: admin at createblog dot com ---- The code provided by joelatlearnossdotcom is incorrect. That will only produce the microseconds of the current time. Here's what it should look like: <? $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; // -------------- // your code here // -------------- $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 6); ?> with $total_time being the script execution time.

« previous php.notes (#140706) next »