summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
3048b63)
Change-Id: I78260cd1a412e93a5d6686888b6ea17f52245a4a
Signed-off-by: Florin Coras <fcoras@cisco.com>
if ((stats->stop.tv_nsec - stats->start.tv_nsec) < 0)
{
diff.tv_sec = stats->stop.tv_sec - stats->start.tv_sec - 1;
if ((stats->stop.tv_nsec - stats->start.tv_nsec) < 0)
{
diff.tv_sec = stats->stop.tv_sec - stats->start.tv_sec - 1;
- diff.tv_nsec = stats->stop.tv_nsec - stats->start.tv_nsec + 1000000000;
+ diff.tv_nsec = stats->stop.tv_nsec - stats->start.tv_nsec + 1e9;
duration = (double) diff.tv_sec + (1e-9 * diff.tv_nsec);
total_bytes = stats->tx_bytes + stats->rx_bytes;
duration = (double) diff.tv_sec + (1e-9 * diff.tv_nsec);
total_bytes = stats->tx_bytes + stats->rx_bytes;
- rate = (double) total_bytes * 8 / duration / ONE_GIG;
+ rate = (double) total_bytes * 8 / duration / 1e9;
printf ("\n%s: Streamed %lu bytes\n"
" in %lf seconds (%lf Gbps %s-duplex)!\n",
header, total_bytes, duration, rate,
printf ("\n%s: Streamed %lu bytes\n"
" in %lf seconds (%lf Gbps %s-duplex)!\n",
header, total_bytes, duration, rate,