Lines Matching defs:wait
141 /** call timeouts handlers, and return how long to wait for next one or -1 */
143 struct timeval* wait)
147 wait->tv_sec = (time_t)-1;
156 /* there is a next larger timeout. wait for it */
157 wait->tv_sec = p->ev_timeout.tv_sec - now->tv_sec;
159 wait->tv_sec--;
160 wait->tv_usec = 1000000 - (now->tv_usec -
163 wait->tv_usec = p->ev_timeout.tv_usec
178 static int handle_select(struct event_base* base, struct timeval* wait)
184 if(wait->tv_sec==(time_t)-1)
185 wait = NULL;
191 if((ret = select(base->maxfd+1, &r, &w, NULL, wait)) == -1) {
232 struct timeval wait;
238 handle_timeouts(base, base->time_tv, &wait);
242 if(handle_select(base, &wait) < 0) {