Lines Matching refs:first
102 struct timespec tsDelta(const struct timespec *first, in tsDelta() argument
107 assert(first != NULL); in tsDelta()
109 assert(first->tv_nsec >= 0 && first->tv_nsec < nSecsPerSec); in tsDelta()
111 rv.tv_sec = second->tv_sec - first->tv_sec; in tsDelta()
112 if (second->tv_nsec >= first->tv_nsec) { in tsDelta()
113 rv.tv_nsec = second->tv_nsec - first->tv_nsec; in tsDelta()
115 rv.tv_nsec = (second->tv_nsec + nSecsPerSec) - first->tv_nsec; in tsDelta()
125 struct timeval tvDelta(const struct timeval *first, in tvDelta() argument
130 assert(first != NULL); in tvDelta()
132 assert(first->tv_usec >= 0 && first->tv_usec < uSecsPerSec); in tvDelta()
134 rv.tv_sec = second->tv_sec - first->tv_sec; in tvDelta()
135 if (second->tv_usec >= first->tv_usec) { in tvDelta()
136 rv.tv_usec = second->tv_usec - first->tv_usec; in tvDelta()
138 rv.tv_usec = (second->tv_usec + uSecsPerSec) - first->tv_usec; in tvDelta()