26 lines
713 B
Diff
26 lines
713 B
Diff
From 445826446c32035b3c8e8a7780c4e4b885f0f98f Mon Sep 17 00:00:00 2001
|
|
From: Jan Macku <jamacku@redhat.com>
|
|
Date: Mon, 7 Dec 2020 15:08:14 +0100
|
|
Subject: [PATCH] ping: Fix incorrect statistics
|
|
|
|
---
|
|
ping_common.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/ping_common.c b/ping_common.c
|
|
index 040bf23..02cb5e1 100644
|
|
--- a/ping_common.c
|
|
+++ b/ping_common.c
|
|
@@ -934,7 +934,7 @@ void finish(void)
|
|
printf(", %g%% packet loss",
|
|
(float) ((((long long)(ntransmitted - nreceived)) * 100.0) /
|
|
ntransmitted));
|
|
- printf(", time %ldms", (1000*tv.tv_sec+tv.tv_usec+500)/1000);
|
|
+ printf(", time %ldms", 1000*tv.tv_sec+(tv.tv_usec+500)/1000);
|
|
}
|
|
putchar('\n');
|
|
|
|
--
|
|
2.28.0
|
|
|