Lines Matching refs:vt
54 absolute_inflate(struct timeval *vt, struct timeval *rt)
58 rt->tv_sec = vt->tv_sec;
59 rt->tv_usec = vt->tv_usec;
61 if ((epoch.tv_sec > vt->tv_sec) ||
62 ((epoch.tv_sec == vt->tv_sec) && (epoch.tv_usec > vt->tv_usec)))
93 absolute_deflate(struct timeval *rt, struct timeval *vt) {
96 vt->tv_sec = rt->tv_sec;
97 vt->tv_usec = rt->tv_usec;
103 vt->tv_sec -= epoch.tv_sec;
104 vt->tv_usec -= epoch.tv_usec;
105 while (vt->tv_usec < 0) {
106 vt->tv_sec -= 1;
107 vt->tv_usec += 1000000;
110 if (vt->tv_sec == 0)
113 d = (double) vt->tv_sec;
114 d += (double) vt->tv_usec / 1000000.;
116 vt->tv_sec = (time_t) d;
117 d -= (double) vt->tv_sec;
118 vt->tv_sec += 1;
119 vt->tv_usec = (suseconds_t) (d * 1000000.);
122 vt->tv_sec += epoch.tv_sec;
123 vt->tv_usec += epoch.tv_usec;
124 while (vt->tv_usec >= 1000000) {
125 vt->tv_sec += 1;
126 vt->tv_usec -= 1000000;
132 interval_inflate(struct timeval *vt, struct timeval *rt) {
139 tv.tv_sec += vt->tv_sec;
140 tv.tv_usec += vt->tv_usec;
158 interval_deflate(struct timeval *rt, struct timeval *vt) {
161 vt->tv_sec = rt->tv_sec;
162 vt->tv_usec = rt->tv_usec;
164 if ((vt->tv_sec == 0) && (vt->tv_usec <= 10000))
177 absolute_deflate(&tv, vt);
179 vt->tv_sec -= now.tv_sec;
180 vt->tv_usec -= now.tv_usec;
181 while (vt->tv_usec < 0) {
182 vt->tv_sec -= 1;
183 vt->tv_usec += 1000000;
186 if ((vt->tv_sec == 0) && (vt->tv_usec < 10000))
187 vt->tv_usec = 10000;