- printf(" in %u.%03u seconds\n",
- deltatv.tv_sec, deltatv.tv_usec/1000);
+ double time_in_sec = (double)deltatv.tv_sec + (double)deltatv.tv_usec/1000.0;
+ double throughput_msg_p_sec = (double) totalmsg/dsecs;
+ double avg_msg_latency = dsecs*1.0E6 / (double)totalmsg;
+
+ printf(" in %ld.%03u seconds\n",
+ (long)deltatv.tv_sec, deltatv.tv_usec/1000);