* Add and subtract routines for timevals. * N.B.: subtract routine doesn't deal with * results which are before the beginning, * it just gets very confused in this case. * Caveat emptor. */
| 988 | * Caveat emptor. |
| 989 | */ |
| 990 | void |
| 991 | timevaladd(struct timeval *t1, const struct timeval *t2) |
| 992 | { |
| 993 | |
| 994 | t1->tv_sec += t2->tv_sec; |
| 995 | t1->tv_usec += t2->tv_usec; |
| 996 | timevalfix(t1); |
| 997 | } |
| 998 | |
| 999 | void |
| 1000 | timevalsub(struct timeval *t1, const struct timeval *t2) |
no test coverage detected