From ec55a7279b7f61dce116a0793ed311bb1c646c05 Mon Sep 17 00:00:00 2001 From: velvettear Date: Fri, 17 Nov 2023 13:34:19 +0100 Subject: [PATCH] another try to fix the interval --- internal/slideshow/slideshow.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/slideshow/slideshow.go b/internal/slideshow/slideshow.go index 3663466..555a7cc 100644 --- a/internal/slideshow/slideshow.go +++ b/internal/slideshow/slideshow.go @@ -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)) } }