mirror of
https://github.com/moparisthebest/curl
synced 2025-03-07 20:59:41 -05:00
calculate upload and download speed using doubles to keep precision.
deleted trailing whitespace
This commit is contained in:
parent
ff52ba7f7b
commit
60f9450594
@ -272,12 +272,14 @@ int Curl_pgrsUpdate(struct connectdata *conn)
|
|||||||
timespent = (long)data->progress.timespent;
|
timespent = (long)data->progress.timespent;
|
||||||
|
|
||||||
/* The average download speed this far */
|
/* The average download speed this far */
|
||||||
data->progress.dlspeed =
|
data->progress.dlspeed = (curl_off_t)
|
||||||
data->progress.downloaded/(timespent?timespent:1);
|
(data->progress.downloaded/(data->progress.timespent>0?
|
||||||
|
data->progress.timespent:1));
|
||||||
|
|
||||||
/* The average upload speed this far */
|
/* The average upload speed this far */
|
||||||
data->progress.ulspeed =
|
data->progress.ulspeed = (curl_off_t)
|
||||||
data->progress.uploaded/(timespent?timespent:1);
|
(data->progress.uploaded/(data->progress.timespent>0?
|
||||||
|
data->progress.timespent:1));
|
||||||
|
|
||||||
if(data->progress.lastshow == Curl_tvlong(now))
|
if(data->progress.lastshow == Curl_tvlong(now))
|
||||||
return 0; /* never update this more than once a second if the end isn't
|
return 0; /* never update this more than once a second if the end isn't
|
||||||
|
Loading…
x
Reference in New Issue
Block a user