From a6fc2b6d459a6fae547167d9eeb8fd66f27a970a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Mon, 13 May 2019 21:41:28 +0200 Subject: [PATCH] ui/app: round total and cpu times Signed-off-by: Elias Naur --- ui/app/window.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/app/window.go b/ui/app/window.go index 0c4bfe57..3415d952 100644 --- a/ui/app/window.go +++ b/ui/app/window.go @@ -138,7 +138,8 @@ func (w *Window) Draw(root *ui.Ops) { frameDur = frameDur.Truncate(100 * time.Microsecond) w.lastFrame = now if w.Profiling { - w.timings = fmt.Sprintf("tot:%7s cpu:%7s %s", frameDur, drawDur, w.gpu.Timings()) + q := 100 * time.Microsecond + w.timings = fmt.Sprintf("tot:%7s cpu:%7s %s", frameDur.Round(q), drawDur.Round(q), w.gpu.Timings()) w.setNextFrame(time.Time{}) } w.reader.Reset(root.Data(), root.Refs())