diff options
author | Daniel Stenberg <daniel@haxx.se> | 2000-11-06 15:32:16 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2000-11-06 15:32:16 +0000 |
commit | e05922c4285bf72b2246c9909703c7411f98163b (patch) | |
tree | 44ed9a02acc9a74b99b657275cc30ed818a1f0d9 /lib | |
parent | 71fb70116891920a71eeaa9daac7f54294e8caf7 (diff) |
modified pgrsTime() to the new functionality
Diffstat (limited to 'lib')
-rw-r--r-- | lib/progress.c | 16 | ||||
-rw-r--r-- | lib/progress.h | 1 |
2 files changed, 14 insertions, 3 deletions
diff --git a/lib/progress.c b/lib/progress.c index 8a8a78f0e..79ba1b59d 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -124,14 +124,24 @@ void pgrsTime(struct UrlData *data, timerid timer) case TIMER_NONE: /* 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 */ + data->progress.t_startsingle = tvnow(); + break; + case TIMER_NAMELOOKUP: - data->progress.t_nslookup = tvnow(); + data->progress.t_nslookup += tvdiff(tvnow(), + data->progress.t_startsingle); break; case TIMER_CONNECT: - data->progress.t_connect = tvnow(); + data->progress.t_connect += tvdiff(tvnow(), + data->progress.t_startsingle); break; case TIMER_PRETRANSFER: - data->progress.t_pretransfer = tvnow(); + data->progress.t_pretransfer += tvdiff(tvnow(), + data->progress.t_startsingle); break; case TIMER_POSTRANSFER: /* this is the normal end-of-transfer thing */ diff --git a/lib/progress.h b/lib/progress.h index a85b46df5..f289ff0e8 100644 --- a/lib/progress.h +++ b/lib/progress.h @@ -49,6 +49,7 @@ typedef enum { TIMER_CONNECT, TIMER_PRETRANSFER, TIMER_POSTRANSFER, + TIMER_STARTSINGLE, TIMER_LAST /* must be last */ } timerid; |