/freebsd/contrib/ntp/sntp/libevent/include/event2/ |
H A D | event_compat.h | 198 #define timeout_add(ev, tv) event_add((ev), (tv)) argument 201 #define timeout_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv)) argument 212 #define signal_add(ev, tv) event_add((ev), (tv)) argument 216 #define signal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv)) argument
|
H A D | event.h | 967 #define evtimer_add(ev, tv) event_add((ev), (tv)) argument 969 #define evtimer_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv)) argument 979 #define evsignal_add(ev, tv) event_add((ev), (tv)) argument 985 #define evsignal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv)) argument 998 #define evuser_pending(ev, tv) event_pending((ev), 0, (tv)) argument 1307 int event_pending(const struct event *ev, short events, struct timeval *tv); 1634 struct timeval *tv);
|
/freebsd/contrib/unbound/util/ |
H A D | timeval_func.h | 45 #define timeval_isset(tv) ((tv)->tv_sec || (tv)->tv_usec) argument 48 #define timeval_clear(tv) ((tv)->tv_sec = (tv)->tv_usec = 0) argument
|
/freebsd/sys/contrib/openzfs/lib/libspl/include/sys/ |
H A D | time.h | 85 struct timeval tv; in gethrestime() local 86 (void) gettimeofday(&tv, NULL); in gethrestime() 87 ts->tv_sec = tv.tv_sec; in gethrestime() 88 ts->tv_nsec = tv.tv_usec * NSEC_PER_USEC; in gethrestime() 94 struct timeval tv; in gethrestime_sec() local 95 (void) gettimeofday(&tv, NULL); in gethrestime_sec() 96 return (tv.tv_sec); in gethrestime_sec()
|
/freebsd/contrib/elftoolchain/libelftc/ |
H A D | elftc_set_timestamps.c | 66 struct timeval tv[2]; in elftc_set_timestamps() local 68 tv[0].tv_sec = sb->ATIME.tv_sec; in elftc_set_timestamps() 69 tv[0].tv_usec = sb->ATIME.tv_nsec / 1000; in elftc_set_timestamps() 70 tv[1].tv_sec = sb->MTIME.tv_sec; in elftc_set_timestamps() 71 tv[1].tv_usec = sb->MTIME.tv_nsec / 1000; in elftc_set_timestamps() 73 return (utimes(fn, tv)); in elftc_set_timestamps()
|
/freebsd/contrib/wpa/src/crypto/ |
H A D | crypto_module_tests.c | 230 if (omac1_aes_128(tv->k, tv->msg, tv->msg_len, result) || in test_omac1_vector() 238 addr[0] = tv->msg; in test_omac1_vector() 251 addr[0] = tv->msg; in test_omac1_vector() 253 addr[1] = tv->msg + tv->msg_len - 2; in test_omac1_vector() 255 addr[2] = tv->msg + tv->msg_len - 1; in test_omac1_vector() 396 os_memcpy(buf, tv->plain, tv->len); in test_cbc() 397 if (aes_128_cbc_encrypt(tv->key, tv->iv, buf, tv->len) || in test_cbc() 398 os_memcmp(buf, tv->cipher, tv->len) != 0) { in test_cbc() 403 os_memcpy(buf, tv->cipher, tv->len); in test_cbc() 404 if (aes_128_cbc_decrypt(tv->key, tv->iv, buf, tv->len) || in test_cbc() [all …]
|
/freebsd/contrib/ntp/sntp/libevent/test/ |
H A D | regress_thread.c | 113 struct timeval tv; in basic_thread() local 115 tv.tv_sec = 0; in basic_thread() 116 tv.tv_usec = 3000; in basic_thread() 149 struct timeval tv; in sigchld_cb() local 153 tv.tv_usec = 100000; in sigchld_cb() 154 tv.tv_sec = 0; in sigchld_cb() 171 struct timeval tv; in thread_basic() local 233 tv.tv_sec = 1000; in thread_basic() 234 event_add(&ev, &tv); in thread_basic() 395 struct timeval tv; in SLEEP_MS() local [all …]
|
/freebsd/contrib/libevent/test/ |
H A D | regress_thread.c | 113 struct timeval tv; in basic_thread() local 115 tv.tv_sec = 0; in basic_thread() 116 tv.tv_usec = 3000; in basic_thread() 149 struct timeval tv; in sigchld_cb() local 153 tv.tv_usec = 100000; in sigchld_cb() 154 tv.tv_sec = 0; in sigchld_cb() 171 struct timeval tv; in thread_basic() local 233 tv.tv_sec = 1000; in thread_basic() 234 event_add(&ev, &tv); in thread_basic() 395 struct timeval tv; in SLEEP_MS() local [all …]
|
/freebsd/contrib/ntp/include/ |
H A D | timevalops.h | 76 #define TVTOTS(tv, ts) \ argument 78 (ts)->l_ui = (u_long)(tv)->tv_sec; \ 82 #define sTVTOTS(tv, ts) \ argument 86 (ts)->l_ui = (tv)->tv_sec; \ 87 usec = (tv)->tv_usec; \ 88 if (((tv)->tv_sec < 0) || ((tv)->tv_usec < 0)) { \ 103 #define TSTOTV(ts, tv) \ argument 105 (tv)->tv_sec = (ts)->l_ui; \ 107 if ((tv)->tv_usec == 1000000) { \ 108 (tv)->tv_sec++; \ [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | buftvtots.c | 21 struct timeval tv; in buftvtots() local 26 memcpy(&tv, bufp, sizeof(tv)); in buftvtots() 31 if (tv.tv_usec > MICROSECONDS - 1) in buftvtots() 34 *ts = tval_stamp_to_lfp(tv); in buftvtots()
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | test_time.c | 43 struct timeval tv; in check_set_time() local 47 gettimeofday(&tv, NULL); in check_set_time() 49 ret = krb5_set_real_time(context, tv.tv_sec + diff, tv.tv_usec); in check_set_time() 57 diff2 = abs(sec - tv.tv_sec); in check_set_time() 61 abs(sec - tv.tv_sec)); in check_set_time()
|
/freebsd/lib/msun/src/ |
H A D | s_exp2f.c | 96 double tv, twopk, u, z; in exp2f() local 130 tv = exp2ft[i0]; in exp2f() 131 u = tv * z; in exp2f() 132 tv = tv + u * (P1 + z * P2) + u * (z * z) * (P3 + z * P4); in exp2f() 135 return (tv * twopk); in exp2f()
|
/freebsd/sys/contrib/libsodium/test/default/ |
H A D | keygen.c | 38 const KeygenTV *tv; in tv_keygen() local 44 tv = &tvs[i]; in tv_keygen() 45 key = (unsigned char *) sodium_malloc(tv->key_len); in tv_keygen() 46 key[tv->key_len - 1U] = 0; in tv_keygen() 48 tv->fn(key); in tv_keygen() 49 if (key[tv->key_len - 1U] != 0) { in tv_keygen()
|
/freebsd/lib/libc/yp/ |
H A D | yplib.c | 463 tv.tv_usec = 0; in _yp_dobind() 519 tv.tv_usec = 0; in _yp_dobind() 558 tv.tv_sec = 1; in _yp_dobind() 559 tv.tv_usec = 0; in _yp_dobind() 708 tv.tv_usec = 0; in yp_match() 798 tv.tv_usec = 0; in yp_first() 877 tv.tv_usec = 0; in yp_next() 955 tv.tv_usec = 0; in yp_all() 1016 tv.tv_usec = 0; in yp_order() 1073 tv.tv_usec = 0; in yp_master() [all …]
|
/freebsd/sys/netinet/ |
H A D | tcp_hpts.c | 818 struct timeval tv; in tcp_hpts_insert_diag() local 833 microuptime(&tv); in tcp_hpts_insert_diag() 969 tv.tv_sec = 0; in tcp_hpts_insert_diag() 970 tv.tv_usec = 0; in tcp_hpts_insert_diag() 972 tv.tv_sec++; in tcp_hpts_insert_diag() 976 sb = tvtosbt(tv); in tcp_hpts_insert_diag() 1581 tv.tv_sec = 0; in __tcp_run_hpts() 1654 tv.tv_sec = 0; in tcp_hpts_thread() 1686 tv.tv_sec = 0; in tcp_hpts_thread() 1761 sb = tvtosbt(tv); in tcp_hpts_thread() [all …]
|
H A D | tcp_timer.h | 130 #define TCPT_RANGESET(tv, value, tvmin, tvmax) do { \ argument 131 (tv) = (value) + tcp_rexmit_slop; \ 132 if ((u_long)(tv) < (u_long)(tvmin)) \ 133 (tv) = (tvmin); \ 134 if ((u_long)(tv) > (u_long)(tvmax)) \ 135 (tv) = (tvmax); \
|
/freebsd/contrib/pf/libevent/ |
H A D | event.h | 165 #define evtimer_add(ev, tv) event_add(ev, tv) argument 168 #define evtimer_pending(ev, tv) event_pending(ev, EV_TIMEOUT, tv) argument 171 #define timeout_add(ev, tv) event_add(ev, tv) argument 174 #define timeout_pending(ev, tv) event_pending(ev, EV_TIMEOUT, tv) argument 177 #define signal_add(ev, tv) event_add(ev, tv) argument 181 #define signal_pending(ev, tv) event_pending(ev, EV_SIGNAL, tv) argument 313 struct timeval *tv);
|
/freebsd/usr.sbin/watchdogd/ |
H A D | watchdogd.c | 209 struct timeval tv; in parse_timeout_to_pow2ns() local 223 tstotv(&tv, &ts); in parse_timeout_to_pow2ns() 224 ticks = tvtohz(&tv); in parse_timeout_to_pow2ns() 299 timersub(&tv_end, &tv_start, &tv); in watchdog_check_dogfunction_time() 300 sec = tv.tv_sec; in watchdog_check_dogfunction_time() 330 sec = tv.tv_sec; in watchdog_check_dogfunction_time() 574 tv->tv_sec = ts->tv_sec; in tstotv() 575 tv->tv_usec = ts->tv_nsec / 1000; in tstotv() 584 tvtohz(struct timeval *tv) in tvtohz() argument 621 sec = tv->tv_sec; in tvtohz() [all …]
|
/freebsd/contrib/netbsd-tests/net/in_cksum/ |
H A D | in_cksum.c | 175 struct timeval tv, old_tv; in main() local 242 tv = res.ru_utime; in main() 246 timersub(&res.ru_utime, &tv, &old_tv); in main() 253 tv = res.ru_utime; in main() 257 timersub(&res.ru_utime, &tv, &tv); in main() 260 (intmax_t)tv.tv_sec, (intmax_t)tv.tv_usec); in main() 262 100 * ((double)tv.tv_sec * 1e6 + tv.tv_usec) / in main()
|
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | dt_work.c | 54 struct timespec tv; in dtrace_sleep() local 86 tv.tv_sec = (earliest - now) / NANOSEC; in dtrace_sleep() 87 tv.tv_nsec = (earliest - now) % NANOSEC; in dtrace_sleep() 94 (void) pthread_cond_reltimedwait_np(&dph->dph_cv, &dph->dph_lock, &tv); in dtrace_sleep() 97 clock_gettime(CLOCK_REALTIME,&tv); in dtrace_sleep() 98 tv.tv_sec += earliest / NANOSEC; in dtrace_sleep() 99 tv.tv_nsec += earliest % NANOSEC; in dtrace_sleep() 100 while (tv.tv_nsec > NANOSEC) { in dtrace_sleep() 101 tv.tv_sec += 1; in dtrace_sleep() 102 tv.tv_nsec -= NANOSEC; in dtrace_sleep() [all …]
|
/freebsd/contrib/libevent/include/event2/ |
H A D | event.h | 967 #define evtimer_add(ev, tv) event_add((ev), (tv)) argument 969 #define evtimer_pending(ev, tv) event_pending((ev), EV_TIMEOUT, (tv)) argument 979 #define evsignal_add(ev, tv) event_add((ev), (tv)) argument 985 #define evsignal_pending(ev, tv) event_pending((ev), EV_SIGNAL, (tv)) argument 998 #define evuser_pending(ev, tv) event_pending((ev), 0, (tv)) argument 1307 int event_pending(const struct event *ev, short events, struct timeval *tv); 1634 struct timeval *tv);
|
/freebsd/contrib/blocklist/port/ |
H A D | clock_gettime.c | 11 struct timeval tv; in clock_gettime() local 12 if (gettimeofday(&tv, NULL) == -1) in clock_gettime() 14 ts->tv_sec = tv.tv_sec; in clock_gettime() 15 ts->tv_nsec = tv.tv_usec * 1000; in clock_gettime()
|
/freebsd/tests/sys/net/routing/ |
H A D | rtsock_print.h | 264 struct timeval tv; in rtsock_print_rtm() local 268 gettimeofday(&tv, NULL); in rtsock_print_rtm() 269 localtime_r(&tv.tv_sec, &tm_res); in rtsock_print_rtm() 285 struct timeval tv; in rtsock_print_rtm() local 286 gettimeofday(&tv, NULL); in rtsock_print_rtm() 313 struct timeval tv; in rtsock_print_ifa() local 317 gettimeofday(&tv, NULL); in rtsock_print_ifa() 318 localtime_r(&tv.tv_sec, &tm_res); in rtsock_print_ifa() 349 struct timeval tv; in rtsock_print_message_hd() local 354 gettimeofday(&tv, NULL); in rtsock_print_message_hd() [all …]
|
/freebsd/contrib/openbsm/compat/ |
H A D | clock_gettime.h | 41 struct timeval tv; in clock_gettime() local 47 if (gettimeofday(&tv, NULL) < 0) in clock_gettime() 49 ts->tv_sec = tv.tv_sec; in clock_gettime() 50 ts->tv_nsec = tv.tv_usec * 1000; in clock_gettime()
|
/freebsd/contrib/sendmail/libsm/ |
H A D | debug.c | 146 struct timeval tv, tvd; local 148 gettimeofday(&tv, NULL); 150 timersub(&tv, &lasttv, &tvd); 158 lasttv = tv; 162 struct timeval tv; local 164 gettimeofday(&tv, NULL); 168 (long) tv.tv_sec, 169 (long) tv.tv_usec);
|