From 8677a0e9c56b17016e41da22d6c16c98ca11d5b9 Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Mon, 15 Aug 2022 16:15:20 +0200 Subject: [PATCH] show debug info in checkTorrents --- main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 8c8b703..c4e6cc5 100644 --- a/main.go +++ b/main.go @@ -68,7 +68,8 @@ func main() { } func checkTorrents() { - fmt.Println("check torrents") + fmt.Println("checking torrents") + start := time.Now() torrents, err := GetLatestNyaaContent() 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) }