Changed output formatting to accurately represent the precision.

This commit is contained in:
David Greenman 1994-08-05 10:34:19 +00:00
parent a03460f16e
commit d410b6f150
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1859

View File

@ -523,7 +523,7 @@ pr_pack(buf, cc, from)
icp->icmp_seq);
(void)printf(" ttl=%d", ip->ip_ttl);
if (timing)
(void)printf(" time=%g ms", triptime);
(void)printf(" time=%.3f ms", triptime);
if (dupflag)
(void)printf(" (DUP!)");
/* check the data */
@ -712,7 +712,7 @@ finish()
if (nreceived && timing) {
/* Only display average to microseconds */
i = 1000.0 * tsum / (nreceived + nrepeats);
(void)printf("round-trip min/avg/max = %g/%g/%g ms\n",
(void)printf("round-trip min/avg/max = %.3f/%.3f/%.3f ms\n",
tmin, ((double)i) / 1000.0, tmax);
}
exit(0);