Lines Matching refs:timeleft
194 struct timeval timenow, timeleft; in dgram_adjust_rcv_timeout() local
217 memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval)); in dgram_adjust_rcv_timeout()
218 timeleft.tv_sec -= timenow.tv_sec; in dgram_adjust_rcv_timeout()
219 timeleft.tv_usec -= timenow.tv_usec; in dgram_adjust_rcv_timeout()
220 if (timeleft.tv_usec < 0) in dgram_adjust_rcv_timeout()
222 timeleft.tv_sec--; in dgram_adjust_rcv_timeout()
223 timeleft.tv_usec += 1000000; in dgram_adjust_rcv_timeout()
226 if (timeleft.tv_sec < 0) in dgram_adjust_rcv_timeout()
228 timeleft.tv_sec = 0; in dgram_adjust_rcv_timeout()
229 timeleft.tv_usec = 1; in dgram_adjust_rcv_timeout()
236 (data->socket_timeout.tv_sec > timeleft.tv_sec) || in dgram_adjust_rcv_timeout()
237 (data->socket_timeout.tv_sec == timeleft.tv_sec && in dgram_adjust_rcv_timeout()
238 data->socket_timeout.tv_usec >= timeleft.tv_usec)) in dgram_adjust_rcv_timeout()
241 timeout = timeleft.tv_sec * 1000 + timeleft.tv_usec / 1000; in dgram_adjust_rcv_timeout()
246 if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &timeleft, in dgram_adjust_rcv_timeout()