- if (nreceived && timing)
- (void)printf("round-trip min/avg/max = %ld/%lu/%ld ms\n",
- tmin, tsum / (nreceived + nrepeats), tmax);
+ 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",
+ tmin, ((double)i) / 1000.0, tmax);
+ }