On Wed, 7 Mar 2001, Todd Cary wrote:
> I want to check the time for queries. I have
>
> $starttime = getmicrotime();
> $endtime = getmicrotime();
> $delta = $endtime - $starttime;
There is no such function as "getmicrotime". You're probably trying to
use "microtime". Second of all, microtime returns a string containing
"msec sec", so you'll need to do this:
list($smsec, $ssec) = explode(" ", microtime());
list($emsec, $esec) = explode(" ", microtime());
$dSec = $esec - $ssec
$dMsec = $emsec - $smsec
Then, if you wanted the number of seconds it took, use $dSec. If you
want the number of milliseconds, use $dMsec. Or, if you want to know
both, just add $dSec and $dMsec and use the result.
Take care
--
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas INN Database Programmer |
| Phone: (309) 743-0812 Fax : (309) 743-0830 |
| Email: [EMAIL PROTECTED] AIM : trifthen |
| Web : hamster.lee.net |
| |
| "Most of our lives are about proving something, either to |
| "ourselves or to someone else." |
| -- Anonymous |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]