mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +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)
|
frameDur = frameDur.Truncate(100 * time.Microsecond)
|
||||||
w.lastFrame = now
|
w.lastFrame = now
|
||||||
if w.Profiling {
|
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.setNextFrame(time.Time{})
|
||||||
}
|
}
|
||||||
w.reader.Reset(root.Data(), root.Refs())
|
w.reader.Reset(root.Data(), root.Refs())
|
||||||
|
|||||||
Reference in New Issue
Block a user