summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Hawkins <[email protected]>2021-12-16 18:05:10 -0500
committerWill Hawkins <[email protected]>2021-12-16 18:05:10 -0500
commit3a87599157a3dd9cb89b4a7c8cba94f7908bcd67 (patch)
tree4cbd0c00ddde0ab0a900db299b874df2c67d535e
parenta1847cfe95e4fb73867cf2aeb5c41e332a7fef1e (diff)
Retype cooldownPeriod Global Variable
cooldownPeriod should really be a time.Duration. Make it so.
-rw-r--r--networkQuality.go8
1 files 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)
}
}