Improve DBG , add stopwatch : timer_start and timer_show
This commit is contained in:
parent
4bf2ca8151
commit
fc4ac725d0
1 changed files with 15 additions and 0 deletions
|
|
@ -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>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue