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