[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [snowflake/master] Use %.f not %.g to format stats interval.
commit 9ab8ea3df4eb6cbe800e816c8b2fe58a9db6c368
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Fri Oct 20 12:25:19 2017 -0700
Use %.f not %.g to format stats interval.
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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits