mirror of
https://github.com/moparisthebest/curl
synced 2024-11-15 22:15:13 -05:00
modified pgrsTime() to the new functionality
This commit is contained in:
parent
71fb701168
commit
e05922c428
@ -124,14 +124,24 @@ void pgrsTime(struct UrlData *data, timerid timer)
|
|||||||
case TIMER_NONE:
|
case TIMER_NONE:
|
||||||
/* mistake filter */
|
/* mistake filter */
|
||||||
break;
|
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 */
|
||||||
|
data->progress.t_startsingle = tvnow();
|
||||||
|
break;
|
||||||
|
|
||||||
case TIMER_NAMELOOKUP:
|
case TIMER_NAMELOOKUP:
|
||||||
data->progress.t_nslookup = tvnow();
|
data->progress.t_nslookup += tvdiff(tvnow(),
|
||||||
|
data->progress.t_startsingle);
|
||||||
break;
|
break;
|
||||||
case TIMER_CONNECT:
|
case TIMER_CONNECT:
|
||||||
data->progress.t_connect = tvnow();
|
data->progress.t_connect += tvdiff(tvnow(),
|
||||||
|
data->progress.t_startsingle);
|
||||||
break;
|
break;
|
||||||
case TIMER_PRETRANSFER:
|
case TIMER_PRETRANSFER:
|
||||||
data->progress.t_pretransfer = tvnow();
|
data->progress.t_pretransfer += tvdiff(tvnow(),
|
||||||
|
data->progress.t_startsingle);
|
||||||
break;
|
break;
|
||||||
case TIMER_POSTRANSFER:
|
case TIMER_POSTRANSFER:
|
||||||
/* this is the normal end-of-transfer thing */
|
/* this is the normal end-of-transfer thing */
|
||||||
|
@ -49,6 +49,7 @@ typedef enum {
|
|||||||
TIMER_CONNECT,
|
TIMER_CONNECT,
|
||||||
TIMER_PRETRANSFER,
|
TIMER_PRETRANSFER,
|
||||||
TIMER_POSTRANSFER,
|
TIMER_POSTRANSFER,
|
||||||
|
TIMER_STARTSINGLE,
|
||||||
TIMER_LAST /* must be last */
|
TIMER_LAST /* must be last */
|
||||||
} timerid;
|
} timerid;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user