Another small update for the transfer log
This commit is contained in:
parent
0f9506b1d9
commit
f947ba80f5
@ -487,11 +487,11 @@ char *transfertime(struct timeval start, struct timeval end, long bytes, int sen
|
|||||||
if (!elapsed)
|
if (!elapsed)
|
||||||
elapsed = 1L;
|
elapsed = 1L;
|
||||||
if (bytes > 1000000)
|
if (bytes > 1000000)
|
||||||
sprintf(resp, "%ld bytes %s in %0.3Lf seconds (%0.0Lf cps)",
|
sprintf(resp, "%ld bytes %s in %0.3Lf seconds (%0.3Lf Kb/s)",
|
||||||
bytes, sent?"sent":"received", elapsed / 1000.000, (bytes / elapsed) * 1000);
|
bytes, sent?"sent":"received", elapsed / 1000.000, ((bytes / elapsed) * 1000) / 1024);
|
||||||
else
|
else
|
||||||
sprintf(resp, "%ld bytes %s in %0.3Lf seconds (%0.0Lf cps)",
|
sprintf(resp, "%ld bytes %s in %0.3Lf seconds (%0.3Lf Kb/s)",
|
||||||
bytes, sent?"sent":"received", elapsed / 1000.000, (bytes * 1000) / elapsed);
|
bytes, sent?"sent":"received", elapsed / 1000.000, ((bytes * 1000) / elapsed) / 1024);
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user