From 3a87599157a3dd9cb89b4a7c8cba94f7908bcd67 Mon Sep 17 00:00:00 2001 From: Will Hawkins Date: Thu, 16 Dec 2021 18:05:10 -0500 Subject: Retype cooldownPeriod Global Variable cooldownPeriod should really be a time.Duration. Make it so. --- networkQuality.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/networkQuality.go b/networkQuality.go index 3c31000..fb1824e 100644 --- a/networkQuality.go +++ b/networkQuality.go @@ -31,8 +31,8 @@ var ( storeSslKeys = flag.Bool("store-ssl-keys", false, "Store SSL keys from connections for debugging. (currently unused)") // Global configuration - cooldownPeriod int = 4 - robustnessProbeIterationCount int = 5 + cooldownPeriod time.Duration = 4 * time.Second + robustnessProbeIterationCount int = 5 ) type ConfigUrls struct { @@ -341,7 +341,7 @@ func main() { fmt.Fprint(os.Stderr, "Error: Saturation could not be completed in time and no provisional rates could be accessed. Test failed.\n") cancelOperatingCtx() if *debug { - time.Sleep(time.Duration(cooldownPeriod) * time.Second) + time.Sleep(cooldownPeriod) } return } @@ -414,6 +414,6 @@ func main() { cancelOperatingCtx() if *debug { - time.Sleep(time.Duration(cooldownPeriod) * time.Second) + time.Sleep(cooldownPeriod) } } -- cgit v1.2.3