diff options
Diffstat (limited to 'src/tool_cb_prg.c')
-rw-r--r-- | src/tool_cb_prg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c index 9facd9e76..b94442be8 100644 --- a/src/tool_cb_prg.c +++ b/src/tool_cb_prg.c @@ -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 */ |