diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-01-09 15:28:34 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-01-09 15:28:56 +0100 |
commit | e6f1e0dbb132d8c932e1ae889eb5af787b0b3cb5 (patch) | |
tree | e760629e17470ca9ead20d4bd1b60f4dcb73927f /lib/progress.c | |
parent | 1c5d8acf79efcf40ba20a232c4133fc81700c809 (diff) | |
download | curl-bagder/time-added.tar.gz |
getinfo: add CURLINFO_ADDED_TIME_Tbagder/time-added
The relative time from the creation of the multi handle until the easy
handle reached the DO state.
initial take for debug and discussion purposes
The name shall be improved/set once we agree on the exact time it is set.
Diffstat (limited to 'lib/progress.c')
-rw-r--r-- | lib/progress.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/progress.c b/lib/progress.c index acebec481..d35eb217c 100644 --- a/lib/progress.c +++ b/lib/progress.c @@ -181,6 +181,14 @@ struct curltime Curl_pgrsTime(struct Curl_easy *data, timerid timer) case TIMER_NONE: /* mistake filter */ break; +#ifdef CURLDEBUG + case TIMER_ADDED: { + /* relative time from the creation of the multi handle */ + struct Curl_multi *m = data->multi_easy ? data->multi_easy : data->multi; + data->progress.t_added = Curl_timediff_us(now, m->t_created); + break; + } +#endif case TIMER_STARTOP: /* This is set at the start of a transfer */ data->progress.t_startop = now; |