note 42049 deleted from function.microtime by tomsommer

From: Date: Wed, 22 Sep 2004 19:32:04 +0000
Subject: note 42049 deleted from function.microtime by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-77195@lists.php.net to get a copy of this message
Note Submitter: tim at telligense dot com ---- this will check the approx speed of your server (doesnt work with MP systems) it also varies depending on server load of course. <? $a=0; // start time $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime; while($a<100000) $a++; // end time $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $total = $endtime-$starttime; echo (100/$total).'Mhz'; // displays mhz of machine ?>

« previous php.notes (#77195) next »