Sure.
PHP has a function called "mircotime()"
this gives a timestamp well into the microseconds.
Do something like this:
$start_time=microtime();
// Do your sql here
$end_time=microtime();
$starttime = explode(" ",$starttime);
$endtime = explode(" ",$endtime);
print number_format((($endtime[0] + $endtime[1])-($starttime[0] + $starttime[1])),4)." seconds.";