Lines Matching defs:t1
812 timevaladd(struct timeval *t1, struct timeval *t2)
814 t1->tv_sec += t2->tv_sec;
815 t1->tv_usec += t2->tv_usec;
816 timevalfix(t1);
820 timevalsub(struct timeval *t1, struct timeval *t2)
822 t1->tv_sec -= t2->tv_sec;
823 t1->tv_usec -= t2->tv_usec;
824 timevalfix(t1);
828 timevalfix(struct timeval *t1)
830 if (t1->tv_usec < 0) {
831 t1->tv_sec--;
832 t1->tv_usec += MICROSEC;
834 if (t1->tv_usec >= MICROSEC) {
835 t1->tv_sec++;
836 t1->tv_usec -= MICROSEC;
845 timespecadd(timespec_t *t1, timespec_t *t2)
847 t1->tv_sec += t2->tv_sec;
848 t1->tv_nsec += t2->tv_nsec;
849 timespecfix(t1);
853 timespecsub(timespec_t *t1, timespec_t *t2)
855 t1->tv_sec -= t2->tv_sec;
856 t1->tv_nsec -= t2->tv_nsec;
857 timespecfix(t1);
861 timespecfix(timespec_t *t1)
863 if (t1->tv_nsec < 0) {
864 t1->tv_sec--;
865 t1->tv_nsec += NANOSEC;
867 if (t1->tv_nsec >= NANOSEC) {
868 t1->tv_sec++;
869 t1->tv_nsec -= NANOSEC;