show debug info in checkTorrents

This commit is contained in:
Timon Ringwald 2022-08-15 16:15:20 +02:00
parent 9934d85022
commit 8677a0e9c5

View File

@ -68,7 +68,8 @@ func main() {
} }
func checkTorrents() { func checkTorrents() {
fmt.Println("check torrents") fmt.Println("checking torrents")
start := time.Now()
torrents, err := GetLatestNyaaContent() torrents, err := GetLatestNyaaContent()
if err != nil { if err != nil {
@ -90,5 +91,6 @@ func checkTorrents() {
} }
} }
fmt.Printf("sleep for %s\n", PollRate) duration := time.Since(start)
fmt.Printf("check took %s. sleeping for %s\n", duration, PollRate-duration)
} }