Lines Matching defs:tv
52 struct timeval now, tv;
54 tv = *tvp; /* Don't modify original tvp. */
56 timersub(&tv, &now, &tv);
57 return tvtohz(&tv);
64 tvtohz(const struct timeval *tv)
89 sec = tv->tv_sec;
90 usec = tv->tv_usec;
95 if (tv->tv_sec > INT_MAX)
97 if (tv->tv_sec < 0)
150 struct timeval tv;
156 TIMESPEC_TO_TIMEVAL(&tv, ts);
157 return tvtohz(&tv);
167 itimerfix(struct timeval *tv)
170 if (tv->tv_sec < 0 || tv->tv_usec < 0 || tv->tv_usec >= 1000000)
172 if (tv->tv_sec == 0 && tv->tv_usec != 0 && tv->tv_usec < tick)
173 tv->tv_usec = tick;