curl: follow-up for commit 5af2bfb9
Use tvnow() and tvdiff() to avoid introducing new linkage issues
This commit is contained in:
@@ -13,8 +13,7 @@ CURLX_ONES = \
|
|||||||
../lib/strtoofft.c \
|
../lib/strtoofft.c \
|
||||||
../lib/strdup.c \
|
../lib/strdup.c \
|
||||||
../lib/rawstr.c \
|
../lib/rawstr.c \
|
||||||
../lib/nonblock.c \
|
../lib/nonblock.c
|
||||||
../lib/timeval.c
|
|
||||||
|
|
||||||
CURL_CFILES = \
|
CURL_CFILES = \
|
||||||
tool_binmode.c \
|
tool_binmode.c \
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "tool_cfgable.h"
|
#include "tool_cfgable.h"
|
||||||
#include "tool_cb_prg.h"
|
#include "tool_cb_prg.h"
|
||||||
|
#include "tool_util.h"
|
||||||
|
|
||||||
#include "memdebug.h" /* keep this as LAST include */
|
#include "memdebug.h" /* keep this as LAST include */
|
||||||
|
|
||||||
@@ -49,12 +50,12 @@ int tool_progress_cb(void *clientp,
|
|||||||
double percent;
|
double percent;
|
||||||
int barwidth;
|
int barwidth;
|
||||||
int num;
|
int num;
|
||||||
struct timeval now = curlx_tvnow();
|
struct timeval now = tvnow();
|
||||||
struct ProgressData *bar = (struct ProgressData *)clientp;
|
struct ProgressData *bar = (struct ProgressData *)clientp;
|
||||||
curl_off_t total;
|
curl_off_t total;
|
||||||
curl_off_t point;
|
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;
|
return 0;
|
||||||
|
|
||||||
/* expected transfer size */
|
/* expected transfer size */
|
||||||
|
|||||||
Reference in New Issue
Block a user