aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2007-10-22 23:31:40 +0000
committerGunter Knauf <gk@gknw.de>2007-10-22 23:31:40 +0000
commitf614fe4946b0e2d792a5da92844fc5d89323b7ef (patch)
treeb618dedaa33e1a6361caf63c66daf471e996f752 /ares
parente6ad066ed1cd727a186ffa5fcbd9042b471982e5 (diff)
removed dependency on gettimeofday() since we use only 1 sec resolution here.
Diffstat (limited to 'ares')
-rw-r--r--ares/ares_init.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ares/ares_init.c b/ares/ares_init.c
index 2627cb46a..0110f1279 100644
--- a/ares/ares_init.c
+++ b/ares/ares_init.c
@@ -107,7 +107,6 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
int i;
int status = ARES_SUCCESS;
struct server_state *server;
- struct timeval tv;
#ifdef CURLDEBUG
const char *env = getenv("CARES_MEMDEBUG");
@@ -147,8 +146,7 @@ int ares_init_options(ares_channel *channelptr, struct ares_options *options,
channel->sock_state_cb = NULL;
channel->sock_state_cb_data = NULL;
- gettimeofday(&tv, NULL);
- channel->last_timeout_processed = tv.tv_sec;
+ channel->last_timeout_processed = (long)time(NULL);
/* Initialize our lists of queries */
ares__init_list_head(&(channel->all_queries));