cURL / Mailing Lists / curl-users / Single Mail

curl-users

[PATCH 2/2] progress bar: increase update frequency to 10Hz

From: Tobias Markus <tobias_at_markus-regensburg.de>
Date: Sun, 05 Jan 2014 19:57:12 +0100

Increasing the update frequency of the progress bar to 10Hz greatly
improves the visual appearance of the progress bar (at least in my
impression).

Signed-off-by: Tobias Markus <tobias_at_markus-regensburg.de>

---
  src/tool_cb_prg.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
index 3c97614..c99bae0 100644
--- a/src/tool_cb_prg.c
+++ b/src/tool_cb_prg.c
@@ -61,7 +61,7 @@ int tool_progress_cb(void *clientp,
    /* we've come this far */
    point = dlnow + ulnow + bar->initial_size;
  -  if(bar->calls && (tvdiff(now, bar->prevtime) < 200L) && point < total)
+  if(bar->calls && (tvdiff(now, bar->prevtime) < 100L) && point < total)
      /* after first call, limit progress-bar updating to 5 Hz */
      /* update when we're at 100% even if last update is less than 
200ms ago */
      return 0;
-- 
1.8.5.2
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-05