mirror of
https://github.com/curl/curl.git
synced 2026-08-26 16:33:35 +03:00
progress: cleanup, less memory
Keep only a single `start` time and calculate the rest in delta microseconds since then. Separate timestamps and durations into separate sub-structures for clarity. remove progress.t_acceptdata It was recorded in FTP accept but never used anywhere. Closes #22547
This commit is contained in:
parent
fbfb2499f0
commit
35843dd635
13 changed files with 144 additions and 141 deletions
|
|
@ -38,7 +38,6 @@ typedef enum {
|
|||
TIMER_PRETRANSFER,
|
||||
TIMER_STARTTRANSFER,
|
||||
TIMER_POSTRANSFER,
|
||||
TIMER_STARTACCEPT,
|
||||
TIMER_REDIRECT,
|
||||
TIMER_LAST /* must be last */
|
||||
} timerid;
|
||||
|
|
@ -47,7 +46,7 @@ typedef enum {
|
|||
const struct curltime *Curl_pgrs_now(struct Curl_easy *data);
|
||||
|
||||
int Curl_pgrsDone(struct Curl_easy *data);
|
||||
void Curl_pgrsStartNow(struct Curl_easy *data);
|
||||
void Curl_pgrsStart(struct Curl_easy *data, const struct curltime *pnow);
|
||||
void Curl_pgrsSetDownloadSize(struct Curl_easy *data, curl_off_t size);
|
||||
void Curl_pgrsSetUploadSize(struct Curl_easy *data, curl_off_t size);
|
||||
CURLcode Curl_pgrs_deliver_check(struct Curl_easy *data, size_t delta);
|
||||
|
|
@ -85,4 +84,8 @@ void Curl_pgrsEarlyData(struct Curl_easy *data, curl_off_t sent);
|
|||
|
||||
void Curl_pgrsCompleted(struct Curl_easy *data);
|
||||
|
||||
timediff_t Curl_pgrs_since_ms(struct Curl_easy *data,
|
||||
const struct curltime *pnow,
|
||||
timerid timer);
|
||||
|
||||
#endif /* HEADER_CURL_PROGRESS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue