Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153696010
D38485.id116932.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
697 B
Referenced Files
None
Subscribers
None
D38485.id116932.diff
View Options
Index: sbin/ping/ping.c
===================================================================
--- sbin/ping/ping.c
+++ sbin/ping/ping.c
@@ -1489,9 +1489,12 @@
(void)fprintf(stderr, "\r%ld/%ld packets received (%.1f%%)",
nreceived, ntransmitted,
ntransmitted ? nreceived * 100.0 / ntransmitted : 0.0);
- if (nreceived && timing)
- (void)fprintf(stderr, " %.3f min / %.3f avg / %.3f max",
- tmin, tsum / (nreceived + nrepeats), tmax);
+ if (nreceived && timing) {
+ double n = nreceived + nrepeats;
+ double avg = tsum / n;
+ (void)fprintf(stderr, " round-trip min/avg/max = "
+ "%.3f/%.3f/%.3f ms", tmin, avg, tmax);
+ }
(void)fprintf(stderr, "\n");
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 24, 12:18 AM (10 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32052192
Default Alt Text
D38485.id116932.diff (697 B)
Attached To
Mode
D38485: ping: Add units to SIGINFO's statistics
Attached
Detach File
Event Timeline
Log In to Comment