更新 main.go

This commit is contained in:
XOF
2026-01-05 15:32:31 +08:00
parent 173660b2f1
commit db3639aa25

View File

@@ -96,12 +96,14 @@ func main() {
} }
func monitor() { func monitor() {
for { rand.Seed(time.Now().UnixNano())
ticker := time.NewTicker(checkInterval)
defer ticker.Stop()
for range ticker.C {
delay := time.Duration(rand.Intn(3600)) * time.Second delay := time.Duration(rand.Intn(3600)) * time.Second
time.Sleep(delay) time.Sleep(delay)
checkAndDownload() checkAndDownload()
time.Sleep(checkInterval)
} }
} }