summaryrefslogtreecommitdiff
path: root/lib/progress.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-04-16 07:59:20 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-04-16 07:59:20 +0000
commit62d205a2ec38ed54e359625d69a7210dc274f093 (patch)
treedaafe4a6819326a2a00694a6352844770dfef2b4 /lib/progress.c
parent29e873b12d9723a7becb6fb2a06f7f346d3e3157 (diff)
downloadcurl-62d205a2ec38ed54e359625d69a7210dc274f093.tar.gz
Dirk Manske brought the patch that introduces two new CURLINFO_* values:
CURLINFO_REDIRECT_TIME and CURLINFO_REDIRECT_COUNT.
Diffstat (limited to 'lib/progress.c')
-rw-r--r--lib/progress.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/progress.c b/lib/progress.c
index 8c48c1ac1..b3052e425 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -103,6 +103,15 @@ void Curl_pgrsDone(struct connectdata *conn)
}
}
+/* reset all times except redirect */
+void Curl_pgrsResetTimes(struct SessionHandle *data)
+{
+ data->progress.t_nslookup = 0.0;
+ data->progress.t_connect = 0.0;
+ data->progress.t_pretransfer = 0.0;
+ data->progress.t_starttransfer = 0.0;
+}
+
void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
{
switch(timer) {
@@ -134,6 +143,10 @@ void Curl_pgrsTime(struct SessionHandle *data, timerid timer)
case TIMER_POSTRANSFER:
/* this is the normal end-of-transfer thing */
break;
+ case TIMER_REDIRECT:
+ data->progress.t_redirect =
+ (double)Curl_tvdiff(Curl_tvnow(), data->progress.t_startsingle)/1000.0;
+ break;
}
}