note 29313 deleted from function.microtime by didou

From: Date: Mon, 29 Dec 2003 15:19:50 +0000
Subject: note 29313 deleted from function.microtime by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-62633@lists.php.net to get a copy of this message
Note Submitter: master@xyborx.dk ---- If anybody is looking for a simple generation-time counter, this might work for you: list($foo,$bar)=explode(' ',microtime()); $timer_start=$foo+$bar; unset($foo); unset($bar); -- all you code goes here -- list($foo,$bar)=explode(' ',microtime()); $timer_end=$foo+$bar; unset($foo); unset($bar); echo 'Generation time: '.round($timer_end-$timer_start,5).' seconds'; There might be a more effecient way of doing it, but at the moment, it works fine for me :)

« previous php.notes (#62633) next »