diff options
author | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-05-20 19:39:51 +0200 |
---|---|---|
committer | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-05-24 22:56:22 +0200 |
commit | 8ab22a74533acee61af31c48e75269822f408cb4 (patch) | |
tree | 24025f8450cf3b72eb5bf9316c1212b0a571363c /tests/libtest/lib1900.c | |
parent | b4d87f54d60711e936fefae388d741b281eecdf0 (diff) | |
download | curl-8ab22a74533acee61af31c48e75269822f408cb4.tar.gz |
time: fix type conversions and compiler warnings
Fix bugs and compiler warnings on systems with 32-bit long and
64-bit time_t.
Reviewed-by: Daniel Stenberg
Closes #1499
Diffstat (limited to 'tests/libtest/lib1900.c')
-rw-r--r-- | tests/libtest/lib1900.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c index 42c0ef1dd..b55f3b7d8 100644 --- a/tests/libtest/lib1900.c +++ b/tests/libtest/lib1900.c @@ -167,7 +167,6 @@ int test(char *URL) for(;;) { struct timeval interval; struct timeval now; - long int msnow, mslast; fd_set rd, wr, exc; int maxfd = -99; long timeout; @@ -177,9 +176,7 @@ int test(char *URL) if(handlenum < num_handles) { now = tutil_tvnow(); - msnow = now.tv_sec * 1000 + now.tv_usec / 1000; - mslast = last_handle_add.tv_sec * 1000 + last_handle_add.tv_usec / 1000; - if((msnow - mslast) >= urltime[handlenum]) { + if(tutil_tvdiff(now, last_handle_add) >= urltime[handlenum]) { fprintf(stdout, "Adding handle %d\n", handlenum); setup_handle(URL, m, handlenum); last_handle_add = now; |