Lines Matching defs:earliest
1694 struct timeval now, earliest;
1703 /* earliest timeout to expire, mark it as lowest. */
1705 timerclear(&earliest);
1715 if(!timerisset(&earliest) || timercmp(&rp->expire, &earliest, <))
1717 earliest = rp->expire;
1723 /* Now find out how much time until the earliest timeout. This */
1724 /* transforms earliest from an absolute time into a delta time, the */
1728 earliest.tv_sec--; /* adjust time to make arithmetic easier */
1729 earliest.tv_usec += 1000000L;
1730 earliest.tv_sec -= now.tv_sec;
1731 earliest.tv_usec -= now.tv_usec;
1732 while (earliest.tv_usec >= 1000000L)
1734 earliest.tv_usec -= 1000000L;
1735 earliest.tv_sec += 1;
1737 if(earliest.tv_sec < 0)
1739 earliest.tv_sec = 0;
1740 earliest.tv_usec = 0;
1744 if(timercmp(&earliest, timeout, <))
1746 *timeout = earliest;