function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
// ton code
$time_end = getmicrotime();
$time = $time_end - $time_start;
print("Texte coloré en $time secondes <br>")