]> code.octet-stream.net Git - broadcaster/blobdiff - radio/main.go
Fix lints
[broadcaster] / radio / main.go
index ca7c99633d8fa6d4595a6d403d4d8f336e15580e..1f95d76e6bdd0c13816959501cfc48b73b3780e8 100644 (file)
@@ -242,7 +242,7 @@ func playlistWorker(ch <-chan []protocol.PlaylistSpec, stop <-chan bool) {
                                }
                        }
                        if found {
-                               duration := soonestTime.Sub(time.Now())
+                               duration := time.Until(soonestTime)
                                log.Println("Next playlist will be id", nextId, "in", duration.Seconds(), "seconds")
                                timer = time.NewTimer(duration)
                        } else {