another try to fix the interval

This commit is contained in:
Daniel Sommer 2023-11-17 13:34:19 +01:00
parent aa9916ad9a
commit ec55a7279b

View file

@ -33,6 +33,7 @@ func Start() {
if sleepTime > 0 {
time.Sleep(sleepTime)
}
sleepTime = time.Until(time.Now().Add(config.Interval))
if scaleImages {
error := setBackgroundPiped(data)
if error != nil {
@ -46,7 +47,6 @@ func Start() {
}
loggo.Info("set new background image", "image: "+image)
}
sleepTime = time.Until(time.Now().Add(config.Interval))
}
}