mirror of
https://github.com/curl/curl.git
synced 2026-08-25 15:03:32 +03:00
curl: --progress-bar max update frequency now at 5Hz
This commit is contained in:
parent
1691a31cab
commit
5af2bfb955
3 changed files with 5 additions and 4 deletions
|
|
@ -49,12 +49,12 @@ int tool_progress_cb(void *clientp,
|
|||
double percent;
|
||||
int barwidth;
|
||||
int num;
|
||||
time_t now = time(NULL);
|
||||
struct timeval now = curlx_tvnow();
|
||||
struct ProgressData *bar = (struct ProgressData *)clientp;
|
||||
curl_off_t total;
|
||||
curl_off_t point;
|
||||
|
||||
if(bar->prevtime == now) /* wait with update */
|
||||
if(curlx_tvdiff(now, bar->prevtime) < 200) /* allow 5 Hz */
|
||||
return 0;
|
||||
|
||||
/* expected transfer size */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue