From b68a4326d206a1239f38b373026c2913cc200f41 Mon Sep 17 00:00:00 2001 From: Gunter Knauf Date: Mon, 22 Oct 2007 23:31:40 +0000 Subject: [PATCH] removed dependency on gettimeofday() since we use only 1 sec resolution here. --- ares_init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ares_init.c b/ares_init.c index 2627cb46..0110f127 100644 --- a/ares_init.c +++ b/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));