From 0623691bab7380cf10c1b2b40278712e10f2d5e3 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 13 May 2022 13:50:19 +0200 Subject: [PATCH] Fix for --once option --- cc-metric-collector.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc-metric-collector.go b/cc-metric-collector.go index 6e1f705..42f7843 100644 --- a/cc-metric-collector.go +++ b/cc-metric-collector.go @@ -291,7 +291,7 @@ func mainFunc() int { // Wait until one tick has passed. This is a workaround if rcfg.CliArgs["once"] == "true" { - x := 1.2 * float64(rcfg.Interval) + x := 1.2 * float64(rcfg.Interval.Seconds()) time.Sleep(time.Duration(int(x)) * time.Second) shutdownSignal <- os.Interrupt }