RE: [PHP] Miliseconds with PHP4

From: Date: Fri, 22 Feb 2002 20:53:50 +0000
Subject: RE: [PHP] Miliseconds with PHP4
Groups: php.general 
Request: Send a blank email to php-general+get-85894@lists.php.net to get a copy of this message
I was looking for the same type of information a few weeks ago, I eventually found what I was looking for in the phpbb system. Here is the code that they used. //put right after your first opening PHP tag $mtime = microtime(); // page creation timers $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $starttime = $mtime; unset ($mtime); // put right before end of your page $mtime = microtime(); $mtime = explode(" ",$mtime); $mtime = $mtime[1] + $mtime[0]; $endtime = $mtime; $totaltime = ($endtime - $starttime); printf("<center>Page created in %f seconds.</center>", $totaltime); -----Original Message----- From: John Fishworld [mailto:john@webital.de] Sent: Friday, February 22, 2002 1:23 PM To: William Lovaton; php-general@lists.php.net Subject: Re: [PHP] Miliseconds with PHP4 how out of interest ? > Hello there, > > I want to know the execution time of some scripts I made, I'm using the > difference of seconds (time() function) between the start and the end of > the script. > > But, I would like to get a greater precision... so, I was wondering if > there is a chance to get miliseconds. > > TIA > > William > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#85894) next »