This commit is contained in:
parent
842ac36f33
commit
b95fe53bf4
|
@ -221,10 +221,10 @@
|
|||
context.font = "12px sans-serif";
|
||||
var text = event.name;
|
||||
var ms;
|
||||
if (event.totaltime == 0) {
|
||||
ms = " < 1 ms";
|
||||
} else {
|
||||
if (event.totaltime < 1) {
|
||||
ms = " ~ " + event.totaltime + " ms";
|
||||
} else {
|
||||
ms = " ~ " + parseInt(event.totaltime) + " ms";
|
||||
}
|
||||
if (x + event.starttime * ratio + context.measureText(text + ms).width > width) {
|
||||
context.textAlign = "end";
|
||||
|
|
|
@ -139,11 +139,11 @@ class StopwatchEvent
|
|||
$total += $period[1] - $period[0];
|
||||
}
|
||||
|
||||
return (int) sprintf('%d', $total);
|
||||
return sprintf('%.1f', $total);
|
||||
}
|
||||
|
||||
private function getNow()
|
||||
{
|
||||
return (int) sprintf('%d', microtime(true) * 1000 - $this->origin);
|
||||
return sprintf('%.1f', microtime(true) * 1000 - $this->origin);
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue