curl: follow-up for commit 5af2bfb9
authorYang Tse <yangsita@gmail.com>
Wed, 31 Jul 2013 13:36:56 +0000 (15:36 +0200)
committerYang Tse <yangsita@gmail.com>
Wed, 31 Jul 2013 13:36:56 +0000 (15:36 +0200)
Use tvnow() and tvdiff() to avoid introducing new linkage issues

src/Makefile.inc
src/tool_cb_prg.c

index 09bd9e804bc01d50e578dbb58688d781c6476004..cd890accc7a1060ae259be217935a583f1546bfa 100644 (file)
@@ -13,8 +13,7 @@ CURLX_ONES = \
        ../lib/strtoofft.c \
        ../lib/strdup.c \
        ../lib/rawstr.c \
-       ../lib/nonblock.c \
-       ../lib/timeval.c
+       ../lib/nonblock.c
 
 CURL_CFILES = \
        tool_binmode.c \
index b94442be8de5a6d687ce1ddbbbea2d10910e6225..cc02126482c32eabfc58cd03c753542a6437046f 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "tool_cfgable.h"
 #include "tool_cb_prg.h"
+#include "tool_util.h"
 
 #include "memdebug.h" /* keep this as LAST include */
 
@@ -49,12 +50,12 @@ int tool_progress_cb(void *clientp,
   double percent;
   int barwidth;
   int num;
-  struct timeval now = curlx_tvnow();
+  struct timeval now = tvnow();
   struct ProgressData *bar = (struct ProgressData *)clientp;
   curl_off_t total;
   curl_off_t point;
 
-  if(curlx_tvdiff(now, bar->prevtime) < 200) /* allow 5 Hz */
+  if(tvdiff(now, bar->prevtime) < 200L) /* allow 5 Hz */
     return 0;
 
   /* expected transfer size */