Check for new top posts every minute

This commit is contained in:
ekzyis 2023-05-15 12:16:47 +02:00
parent 21364b5c35
commit 2693ef2378
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ import (
func WaitUntilNextUpdate() {
now := time.Now()
dur := now.Truncate(time.Hour).Add(time.Hour).Sub(now)
dur := now.Truncate(time.Minute).Add(time.Minute).Sub(now)
log.Println("sleeping for", dur.Round(time.Second))
time.Sleep(dur)
}