Lines Matching refs:now
57 ares_socket_t read_fd, struct timeval *now);
58 static void process_timeouts(ares_channel_t *channel, struct timeval *now);
62 ares_bool_t tcp, struct timeval *now);
105 /* return true if now is exactly check time or later */
106 ares_bool_t ares__timedout(const struct timeval *now,
109 ares_int64_t secs = ((ares_int64_t)now->tv_sec - (ares_int64_t)check->tv_sec);
119 return ((ares_int64_t)now->tv_usec - (ares_int64_t)check->tv_usec) >= 0
125 static void timeadd(struct timeval *now, size_t millisecs)
127 now->tv_sec += (time_t)millisecs / 1000;
128 now->tv_usec += (time_t)((millisecs % 1000) * 1000);
130 if (now->tv_usec >= 1000000) {
131 ++(now->tv_sec);
132 now->tv_usec -= 1000000;
143 struct timeval now;
151 now = ares__tvnow();
152 read_packets(channel, read_fds, read_fd, &now);
153 process_timeouts(channel, &now);
276 struct server_connection *conn, struct timeval *now)
340 status = process_answer(channel, data, data_len, conn, ARES_TRUE, now);
415 struct timeval *now)
468 process_answer(channel, buf, (size_t)read_len, conn, ARES_FALSE, now);
479 ares_socket_t read_fd, struct timeval *now)
502 read_tcp_data(channel, conn, now);
504 read_udp_packets_fd(channel, conn, now);
536 read_tcp_data(channel, conn, now);
538 read_udp_packets_fd(channel, conn, now);
546 static void process_timeouts(ares_channel_t *channel, struct timeval *now)
557 if (!ares__timedout(now, &query->timeout)) {
566 ares__requeue_query(query, now);
619 ares_bool_t tcp, struct timeval *now)
681 ares__send_query(query, now);
693 ares__send_query(query, now);
720 ares__requeue_query(query, now);
731 if (ares_qcache_insert(channel, now, query, rdnsrec) == ARES_SUCCESS) {
761 ares_status_t ares__requeue_query(struct query *query, struct timeval *now)
769 return ares__send_query(query, now);
876 ares_status_t ares__send_query(struct query *query, struct timeval *now)
919 return ares__requeue_query(query, now);
978 return ares__requeue_query(query, now);
992 status = ares__requeue_query(query, now);
1009 query->timeout = *now;