X-Git-Url: https://code.octet-stream.net/broadcaster/blobdiff_plain/58bdba17879dd4866007647d06e2bdce1acf1f59..d49d716a33dc5eda5b0cb634b762405f7cf509fe:/radio/main.go diff --git a/radio/main.go b/radio/main.go index ca7c996..1f95d76 100644 --- a/radio/main.go +++ b/radio/main.go @@ -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 {