Lines Matching refs:tv
43 static struct timeval32 tv_divide(struct timeval32 tv, int dividend);
44 static struct timeval32 tv_mult(struct timeval32 tv, int multiplier);
45 #define tv_to_usec(tv) (((tv).tv_sec * 1000000) + (tv).tv_usec)
320 /* tv / dividend */
322 tv_divide(struct timeval32 tv, int dividend)
327 return (tv);
328 usecs = tv_to_usec(tv);
330 tv = usec_to_tv(usecs);
331 return (tv);
334 /* tv * multiplier (works for small multipliers * seconds, < 1000) */
336 tv_mult(struct timeval32 tv, int multiplier)
340 usecs = tv_to_usec(tv);
342 tv = usec_to_tv(usecs);
343 return (tv);
349 struct timeval32 tv;
351 tv.tv_sec = usec / 1000000;
352 tv.tv_usec = usec % 1000000;
353 return (tv);