summaryrefslogtreecommitdiff
path: root/ares_init.c
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
commitb68a4326d206a1239f38b373026c2913cc200f41 (patch)
treef1b996ff78475f7ae27ce7d954896ffbf3f0339d /ares_init.c
parent1fe4d44ed98e3e958c31585f6127409789ca4f24 (diff)
downloadc-ares-b68a4326d206a1239f38b373026c2913cc200f41.tar.gz
c-ares-b68a4326d206a1239f38b373026c2913cc200f41.tar.bz2
c-ares-b68a4326d206a1239f38b373026c2913cc200f41.zip
removed dependency on gettimeofday() since we use only 1 sec resolution here.
Diffstat (limited to 'ares_init.c')
-rw-r--r--ares_init.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ares_init.c b/ares_init.c
index 2627cb4..0110f12 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));