Improve DBG , add stopwatch : timer_start and timer_show

This commit is contained in:
Dany wm 2023-12-07 21:41:12 +01:00
parent 4bf2ca8151
commit fc4ac725d0

View file

@ -134,5 +134,20 @@ EOF;
EOF;
return $r;
}
public static function timer_start()
{
global $timer;
$timer=hrtime(true);
}
public static function timer_show()
{
global $timer;
// $delta=$timer-microtime(true) ;
echo '<span style="font-size:80%;color:navy;background:lightgreen">';
echo _("Temps écoulé : ");
echo (hrtime(true)-$timer)/1e+6;
echo '</span>';
}
}
?>