Lines Matching +full:tv +full:- +full:set
3 * Copyright (C) 1999-2001 Internet Software Consortium.
41 fix_tv_usec(struct timeval *tv) { in fix_tv_usec() argument
44 if (tv->tv_usec < 0) { in fix_tv_usec()
47 tv->tv_sec -= 1; in fix_tv_usec()
48 tv->tv_usec += US_PER_S; in fix_tv_usec()
49 } while (tv->tv_usec < 0); in fix_tv_usec()
50 } else if (tv->tv_usec >= US_PER_S) { in fix_tv_usec()
53 tv->tv_sec += 1; in fix_tv_usec()
54 tv->tv_usec -= US_PER_S; in fix_tv_usec()
55 } while (tv->tv_usec >=US_PER_S); in fix_tv_usec()
67 struct timeval tv; in isc_stdtime_get() local
70 * Set 't' to the number of seconds since 00:00:00 UTC, January 1, in isc_stdtime_get()
76 RUNTIME_CHECK(gettimeofday(&tv, NULL) != -1); in isc_stdtime_get()
79 fix_tv_usec(&tv); in isc_stdtime_get()
80 INSIST(tv.tv_usec >= 0); in isc_stdtime_get()
82 INSIST(tv.tv_usec >= 0 && tv.tv_usec < US_PER_S); in isc_stdtime_get()
85 *t = (unsigned int)tv.tv_sec; in isc_stdtime_get()