io/router: rename Router.Add to the more specific Queue

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-01-22 16:36:14 +01:00
parent 24f69bf4bb
commit 4f45d9a567
8 changed files with 35 additions and 35 deletions
+2 -2
View File
@@ -180,7 +180,7 @@ func (w *Window) processFrame(frameStart time.Time, size image.Point, frame *op.
frameDur = frameDur.Truncate(100 * time.Microsecond)
q := 100 * time.Microsecond
timings := fmt.Sprintf("tot:%7s %s", frameDur.Round(q), w.loop.Summary())
w.queue.q.Add(profile.Event{Timings: timings})
w.queue.q.Queue(profile.Event{Timings: timings})
}
if t, ok := w.queue.q.WakeupTime(); ok {
w.setNextFrame(t)
@@ -420,7 +420,7 @@ func (w *Window) run(opts *window.Options) {
w.ack <- struct{}{}
return
case event.Event:
if w.queue.q.Add(e2) {
if w.queue.q.Queue(e2) {
w.setNextFrame(time.Time{})
w.updateAnimation()
}