Lines Matching refs:rt
46 absolute_inflate(struct timeval *vt, struct timeval *rt)
50 rt->tv_sec = vt->tv_sec;
51 rt->tv_usec = vt->tv_usec;
57 rt->tv_sec -= epoch.tv_sec;
58 rt->tv_usec -= epoch.tv_usec;
59 while (rt->tv_usec < 0) {
60 rt->tv_sec -= 1;
61 rt->tv_usec += 1000000;
64 if (rt->tv_sec == 0)
67 d = (double) (rt->tv_sec - 1);
68 d += (double) rt->tv_usec / 1000000.;
70 rt->tv_sec = (time_t) d;
71 d -= (double) rt->tv_sec;
72 rt->tv_usec = (suseconds_t) (d * 1000000.);
75 rt->tv_sec += epoch.tv_sec;
76 rt->tv_usec += epoch.tv_usec;
77 while (rt->tv_usec >= 1000000) {
78 rt->tv_sec += 1;
79 rt->tv_usec -= 1000000;
85 absolute_deflate(struct timeval *rt, struct timeval *vt) {
88 vt->tv_sec = rt->tv_sec;
89 vt->tv_usec = rt->tv_usec;
91 if ((epoch.tv_sec > rt->tv_sec) ||
92 ((epoch.tv_sec == rt->tv_sec) && (epoch.tv_usec > rt->tv_usec)))
124 interval_inflate(struct timeval *vt, struct timeval *rt) {
138 absolute_inflate(&tv, rt);
140 rt->tv_sec -= now.tv_sec;
141 rt->tv_usec -= now.tv_usec;
142 if (rt->tv_usec < 0) {
143 rt->tv_sec -= 1;
144 rt->tv_usec += 1000000;
150 interval_deflate(struct timeval *rt, struct timeval *vt) {
153 vt->tv_sec = rt->tv_sec;
154 vt->tv_usec = rt->tv_usec;
161 tv.tv_sec = now.tv_sec + rt->tv_sec;
162 tv.tv_usec = now.tv_usec + rt->tv_usec;