Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Oct 21, 2011
1 parent 842ac36 commit b95fe53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/HttpKernel/Debug/StopwatchEvent.php
Expand Up @@ -139,11 +139,11 @@ public function getTotalTime()
$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);
}
}

0 comments on commit b95fe53

Please sign in to comment.