Re: timer

From: Date: Wed, 12 Jun 2002 06:39:10 +0000
Subject: Re: timer
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-19754@lists.php.net to get a copy of this message
> hi to all, > how can I set up a timer that will tell me how long a query takes to run. > for example, if I run the following query, I would like to know how long it > takes. [...] > Thanks in advanced > Nato I don't remember where I 've found this snippet, but it works well. $TIMER_START = explode(" ", microtime()); $TIMER_START = $TIMER_START[1] + $TIMER_START[0]; ## Do some stuff here: $TIMER_END = explode(" ", microtime()); $TIMER_END = $TIMER_END[1] + $TIMER_END[0]; echo "<br>", $TIMER_END - $TIMER_START, " secs"; Regards, Philippe

« previous php.db (#19754) next »