From 3db366d1f651ab48b4fafec86f247c8a94517d28 Mon Sep 17 00:00:00 2001 From: nlif-m Date: Mon, 19 Feb 2024 16:26:22 +0300 Subject: [PATCH] fix: now timer is working as intended --- main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.go b/main.go index 19b53ef..3a9064d 100644 --- a/main.go +++ b/main.go @@ -89,10 +89,8 @@ func main() { }(fullUpdateChan, atomFileUpdateChan) // Run timer to call update every cfg.ProgramRestartIntervalMinutes minutes - timeToSleep := time.Duration(cfg.ProgramRestartIntervalMinutes * uint(time.Minute)) - tick := time.Tick(timeToSleep) for { - <-tick + time.Sleep(time.Duration(cfg.ProgramRestartIntervalMinutes) * time.Minute) log.Println("Time to update, timer tick") fullUpdateChan <- true }