Lines Matching refs:timeleft
273 struct timeval timenow, timeleft;
301 memcpy(&timeleft, &(data->next_timeout), sizeof(struct timeval));
302 timeleft.tv_sec -= timenow.tv_sec;
303 timeleft.tv_usec -= timenow.tv_usec;
304 if (timeleft.tv_usec < 0)
306 timeleft.tv_sec--;
307 timeleft.tv_usec += 1000000;
310 if (timeleft.tv_sec < 0)
312 timeleft.tv_sec = 0;
313 timeleft.tv_usec = 1;
320 (data->socket_timeout.tv_sec > timeleft.tv_sec) ||
321 (data->socket_timeout.tv_sec == timeleft.tv_sec &&
322 data->socket_timeout.tv_usec >= timeleft.tv_usec))
325 timeout = timeleft.tv_sec * 1000 + timeleft.tv_usec / 1000;
330 if ( setsockopt(b->num, SOL_SOCKET, SO_RCVTIMEO, &timeleft,