summaryrefslogtreecommitdiff
path: root/lib/progress.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2001-11-20 15:00:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2001-11-20 15:00:50 +0000
commitca0fd33d2d3ecca13bc78893e165a34682b4dcd2 (patch)
treedabe130a246fdf0d04f5d3196b644729e6d2ef15 /lib/progress.c
parent271f96f78f04f556ba953b10d31bfed2202ad439 (diff)
downloadcurl-ca0fd33d2d3ecca13bc78893e165a34682b4dcd2.tar.gz
Georg Horn's STARTTRANSFER_TIME patch
Diffstat (limited to 'lib/progress.c')
-rw-r--r--lib/progress.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 865744654..318a6d872 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -111,22 +111,24 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
/* mistake filter */
break;
case TIMER_STARTSINGLE:
- /* This is set at the start of a single fetch, there may be several
- fetches within an operation, why we add all other times relative
- to this one */
+ /* This is set at the start of a single fetch */
data->progress.t_startsingle = Curl_tvnow();
break;
case TIMER_NAMELOOKUP:
- data->progress.t_nslookup +=
+ data->progress.t_nslookup =
(double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
break;
case TIMER_CONNECT:
- data->progress.t_connect +=
+ data->progress.t_connect =
(double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
break;
case TIMER_PRETRANSFER:
- data->progress.t_pretransfer +=
+ data->progress.t_pretransfer =
+ (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
+ break;
+ case TIMER_STARTTRANSFER:
+ data->progress.t_starttransfer =
(double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
break;
case TIMER_POSTRANSFER:
@@ -227,7 +229,7 @@ int Curl_pgrsUpdate(struct connectdata *conn)
/* The exact time spent so far (from the start) */
timespent = (double)Curl_tvdiff (now, data->progress.start)/1000;
- data->progress.timespent = (long)timespent;
+ data->progress.timespent = timespent;
/* The average download speed this far */
data->progress.dlspeed =