Check for new top posts every minute
This commit is contained in:
parent
21364b5c35
commit
2693ef2378
2
main.go
2
main.go
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
func WaitUntilNextUpdate() {
|
func WaitUntilNextUpdate() {
|
||||||
now := time.Now()
|
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))
|
log.Println("sleeping for", dur.Round(time.Second))
|
||||||
time.Sleep(dur)
|
time.Sleep(dur)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue