Lines Matching full:t1
102 timevaladd(struct timeval *t1, struct timeval *t2)
104 t1->tv_sec += t2->tv_sec;
105 t1->tv_usec += t2->tv_usec;
106 timevalfix(t1);
110 timevalsub(struct timeval *t1, struct timeval *t2)
112 t1->tv_sec -= t2->tv_sec;
113 t1->tv_usec -= t2->tv_usec;
114 timevalfix(t1);
118 timevalfix(struct timeval *t1)
120 if (t1->tv_usec < 0) {
121 t1->tv_sec--;
122 t1->tv_usec += 1000000;
124 if (t1->tv_usec >= 1000000) {
125 t1->tv_sec++;
126 t1->tv_usec -= 1000000;