From 9ab8ea3df4eb6cbe800e816c8b2fe58a9db6c368 Mon Sep 17 00:00:00 2001 From: David Fifield Date: Fri, 20 Oct 2017 12:25:19 -0700 Subject: [PATCH] Use %.f not %.g to format stats interval. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fmt.Sprintf("%.g", 86400.4) → "9e+04" fmt.Sprintf("%.f", 86400.4) → "86400" --- server/stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/stats.go b/server/stats.go index 51b2f7e..204e587 100644 --- a/server/stats.go +++ b/server/stats.go @@ -32,7 +32,7 @@ func statsThread() { numConnections += 1 case <-deadline: now := time.Now() - log.Printf("in the past %.g s, %d/%d connections had client_ip", + log.Printf("in the past %.f s, %d/%d connections had client_ip", (now.Sub(prevTime)).Seconds(), numClientIP, numConnections) numClientIP = 0