Lines Matching defs:tmx
195 struct timex tmx = {};
198 tmx.modes = ADJ_SETOFFSET;
200 tmx.modes |= ADJ_NANO;
202 tmx.time.tv_sec = offset / NSEC_PER_SEC;
203 tmx.time.tv_usec = offset % NSEC_PER_SEC;
205 if (offset < 0 && tmx.time.tv_usec) {
206 tmx.time.tv_sec -= 1;
207 tmx.time.tv_usec += NSEC_PER_SEC;
210 tmx.time.tv_sec = offset / USEC_PER_SEC;
211 tmx.time.tv_usec = offset % USEC_PER_SEC;
213 if (offset < 0 && tmx.time.tv_usec) {
214 tmx.time.tv_sec -= 1;
215 tmx.time.tv_usec += USEC_PER_SEC;
219 ret = clock_adjtime(CLOCK_REALTIME, &tmx);
221 printf("(sec: %ld usec: %ld) ", tmx.time.tv_sec, tmx.time.tv_usec);
230 struct timex tmx = {};
233 tmx.modes = ADJ_SETOFFSET;
235 tmx.modes |= ADJ_NANO;
237 tmx.time.tv_sec = sec;
238 tmx.time.tv_usec = usec;
239 ret = clock_adjtime(CLOCK_REALTIME, &tmx);
241 printf("Invalid (sec: %ld usec: %ld) did not fail! ", tmx.time.tv_sec, tmx.time.tv_usec);