mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
ui/app: round total and cpu times
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-1
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user