Lines Matching refs:first
101 // second, is later than the time pointed to by first.
102 struct timespec tsDelta(const struct timespec *first,
107 assert(first != NULL);
109 assert(first->tv_nsec >= 0 && first->tv_nsec < nSecsPerSec);
111 rv.tv_sec = second->tv_sec - first->tv_sec;
112 if (second->tv_nsec >= first->tv_nsec) {
113 rv.tv_nsec = second->tv_nsec - first->tv_nsec;
115 rv.tv_nsec = (second->tv_nsec + nSecsPerSec) - first->tv_nsec;
124 // second, is later than the time pointed to by first.
125 struct timeval tvDelta(const struct timeval *first,
130 assert(first != NULL);
132 assert(first->tv_usec >= 0 && first->tv_usec < uSecsPerSec);
134 rv.tv_sec = second->tv_sec - first->tv_sec;
135 if (second->tv_usec >= first->tv_usec) {
136 rv.tv_usec = second->tv_usec - first->tv_usec;
138 rv.tv_usec = (second->tv_usec + uSecsPerSec) - first->tv_usec;