Lines Matching full:second
101 // second, is later than the time pointed to by first.
103 const struct timespec *second)
108 assert(second != NULL);
110 assert(second->tv_nsec >= 0 && second->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.
126 const struct timeval *second)
131 assert(second != NULL);
133 assert(second->tv_usec >= 0 && second->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;