mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 07:39:50 -04: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;
|
||||
|
||||
/* The average download speed this far */
|
||||
data->progress.dlspeed =
|
||||
data->progress.downloaded/(timespent?timespent:1);
|
||||
data->progress.dlspeed = (curl_off_t)
|
||||
(data->progress.downloaded/(data->progress.timespent>0?
|
||||
data->progress.timespent:1));
|
||||
|
||||
/* The average upload speed this far */
|
||||
data->progress.ulspeed =
|
||||
data->progress.uploaded/(timespent?timespent:1);
|
||||
data->progress.ulspeed = (curl_off_t)
|
||||
(data->progress.uploaded/(data->progress.timespent>0?
|
||||
data->progress.timespent:1));
|
||||
|
||||
if(data->progress.lastshow == Curl_tvlong(now))
|
||||
return 0; /* never update this more than once a second if the end isn't
|
||||
|
Loading…
x
Reference in New Issue
Block a user