Dirk Manske brought the patch that introduces two new CURLINFO_* values:

CURLINFO_REDIRECT_TIME and CURLINFO_REDIRECT_COUNT.
This commit is contained in:
Daniel Stenberg
2002-04-16 07:59:20 +00:00
parent 29e873b12d
commit 62d205a2ec
7 changed files with 44 additions and 1 deletions

View File

@@ -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;
}
}