Home
last modified time | relevance | path

Searched refs:tv (Results 1 – 25 of 576) sorted by relevance

12345678910>>...24

/freebsd-14-stable/tests/sys/kern/acct/
HDacct_test.c80 struct timeval tv; in ATF_TC_BODY() local
82 tv.tv_sec = 0; in ATF_TC_BODY()
83 tv.tv_usec = 0; in ATF_TC_BODY()
84 v.c = encode_timeval(tv); in ATF_TC_BODY()
111 struct timeval tv; in ATF_TC_BODY() local
113 tv.tv_sec = 1; in ATF_TC_BODY()
114 tv.tv_usec = 0; in ATF_TC_BODY()
115 v.c = encode_timeval(tv); in ATF_TC_BODY()
117 (float)tv.tv_sec * AHZ + tv.tv_usec, v); in ATF_TC_BODY()
128 struct timeval tv; in ATF_TC_BODY() local
[all …]
/freebsd-14-stable/contrib/ntp/libntp/lib/isc/unix/
HDstdtime.c41 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
[all …]
HDtime.c62 fix_tv_usec(struct timeval *tv) { in fix_tv_usec() argument
65 if (tv->tv_usec < 0) { in fix_tv_usec()
68 tv->tv_sec -= 1; in fix_tv_usec()
69 tv->tv_usec += US_PER_S; in fix_tv_usec()
70 } while (tv->tv_usec < 0); in fix_tv_usec()
71 } else if (tv->tv_usec >= US_PER_S) { in fix_tv_usec()
74 tv->tv_sec += 1; in fix_tv_usec()
75 tv->tv_usec -= US_PER_S; in fix_tv_usec()
76 } while (tv->tv_usec >=US_PER_S); in fix_tv_usec()
147 struct timeval tv; in isc_time_now() local
[all …]
/freebsd-14-stable/usr.sbin/ypserv/common/
HDyplib_host.c69 struct timeval tv; in yp_bind_host() local
93 tv.tv_sec = 10; in yp_bind_host()
94 tv.tv_usec = 0; in yp_bind_host()
100 client = clntudp_create(&rsrv_sin, program, version, tv, in yp_bind_host()
116 struct timeval tv; in yp_bind_local() local
125 tv.tv_sec = 10; in yp_bind_local()
126 tv.tv_usec = 0; in yp_bind_local()
128 client = clntudp_create(&rsrv_sin, program, version, tv, &rsrv_sock); in yp_bind_local()
142 struct timeval tv; in yp_match_host() local
148 tv.tv_sec = _yplib_host_timeout; in yp_match_host()
[all …]
/freebsd-14-stable/tools/regression/poll/
HDpipeselect.c19 #define SETUP(fd, rfds, tv) do { \ argument
22 (tv).tv_sec = 0; \
23 (tv).tv_usec = 0; \
62 struct timeval tv; in child() local
75 SETUP(fd, rfds, tv); in child()
76 if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) in child()
106 SETUP(fd, rfds, tv); in child()
107 if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) in child()
115 SETUP(fd, rfds, tv); in child()
116 if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) in child()
[all …]
/freebsd-14-stable/tools/regression/priv/
HDpriv_vfs_utimes.c90 struct timeval tv[2]; in priv_vfs_utimes_froot() local
93 tv[0].tv_sec = 0; in priv_vfs_utimes_froot()
94 tv[0].tv_usec = 0; in priv_vfs_utimes_froot()
95 tv[1].tv_sec = 0; in priv_vfs_utimes_froot()
96 tv[1].tv_usec = 0; in priv_vfs_utimes_froot()
97 error = utimes(fpath, tv); in priv_vfs_utimes_froot()
133 struct timeval tv[2]; in priv_vfs_utimes_fowner() local
136 tv[0].tv_sec = 0; in priv_vfs_utimes_fowner()
137 tv[0].tv_usec = 0; in priv_vfs_utimes_fowner()
138 tv[1].tv_sec = 0; in priv_vfs_utimes_fowner()
[all …]
/freebsd-14-stable/sys/contrib/openzfs/tests/zfs-tests/tests/functional/hkdf/
HDhkdf_test.c182 run_test(int i, const hkdf_tv_t *tv) in run_test() argument
189 ret = hkdf_sha512((uint8_t *)tv->ikm, tv->ikm_len, (uint8_t *)tv->salt, in run_test()
190 tv->salt_len, (uint8_t *)tv->info, tv->info_len, good, tv->okm_len); in run_test()
196 if (memcmp(good, tv->okm, tv->okm_len) != 0) { in run_test()
198 hexdump("Expected:", (uint8_t *)tv->okm, tv->okm_len); in run_test()
199 hexdump("Actual: ", good, tv->okm_len); in run_test()
/freebsd-14-stable/tools/build/
HDfutimens.c42 struct timeval now, tv[2], *tvp; in futimens() local
65 tv[0].tv_sec = times[0].tv_sec; in futimens()
66 tv[0].tv_usec = times[0].tv_nsec / 1000; in futimens()
67 tv[1].tv_sec = times[1].tv_sec; in futimens()
68 tv[1].tv_usec = times[1].tv_nsec / 1000; in futimens()
69 tvp = tv; in futimens()
75 tv[0].tv_sec = sb.st_atim.tv_sec; in futimens()
76 tv[0].tv_usec = sb.st_atim.tv_nsec / 1000; in futimens()
79 tv[1].tv_sec = sb.st_mtim.tv_sec; in futimens()
80 tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000; in futimens()
[all …]
HDutimensat.c42 struct timeval now, tv[2], *tvp; in utimensat() local
69 tv[0].tv_sec = times[0].tv_sec; in utimensat()
70 tv[0].tv_usec = times[0].tv_nsec / 1000; in utimensat()
71 tv[1].tv_sec = times[1].tv_sec; in utimensat()
72 tv[1].tv_usec = times[1].tv_nsec / 1000; in utimensat()
73 tvp = tv; in utimensat()
79 tv[0].tv_sec = sb.st_atim.tv_sec; in utimensat()
80 tv[0].tv_usec = sb.st_atim.tv_nsec / 1000; in utimensat()
83 tv[1].tv_sec = sb.st_mtim.tv_sec; in utimensat()
84 tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000; in utimensat()
[all …]
/freebsd-14-stable/contrib/libevent/
HDevutil_time.c72 evutil_gettimeofday(struct timeval *tv, struct timezone *tz) in evutil_gettimeofday() argument
93 if (tv == NULL) in evutil_gettimeofday()
118 tv->tv_sec = (long) (ft.ft_64 / UNITS_PER_SEC); in evutil_gettimeofday()
119 tv->tv_usec = (long) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC); in evutil_gettimeofday()
128 evutil_tv_to_msec_(const struct timeval *tv) in evutil_tv_to_msec_() argument
130 if (tv->tv_usec > 1000000 || tv->tv_sec > MAX_SECONDS_IN_MSEC_LONG) in evutil_tv_to_msec_()
133 return (tv->tv_sec * 1000) + ((tv->tv_usec + 999) / 1000); in evutil_tv_to_msec_()
141 evutil_usleep_(const struct timeval *tv) in evutil_usleep_() argument
143 if (!tv) in evutil_usleep_()
151 usec = tv->tv_sec * 1000000LL + tv->tv_usec; in evutil_usleep_()
[all …]
/freebsd-14-stable/contrib/ntp/sntp/libevent/
HDevutil_time.c72 evutil_gettimeofday(struct timeval *tv, struct timezone *tz) in evutil_gettimeofday() argument
93 if (tv == NULL) in evutil_gettimeofday()
118 tv->tv_sec = (long) (ft.ft_64 / UNITS_PER_SEC); in evutil_gettimeofday()
119 tv->tv_usec = (long) ((ft.ft_64 / UNITS_PER_USEC) % USEC_PER_SEC); in evutil_gettimeofday()
128 evutil_tv_to_msec_(const struct timeval *tv) in evutil_tv_to_msec_() argument
130 if (tv->tv_usec > 1000000 || tv->tv_sec > MAX_SECONDS_IN_MSEC_LONG) in evutil_tv_to_msec_()
133 return (tv->tv_sec * 1000) + ((tv->tv_usec + 999) / 1000); in evutil_tv_to_msec_()
141 evutil_usleep_(const struct timeval *tv) in evutil_usleep_() argument
143 if (!tv) in evutil_usleep_()
151 usec = tv->tv_sec * 1000000LL + tv->tv_usec; in evutil_usleep_()
[all …]
/freebsd-14-stable/sys/compat/linuxkpi/common/include/linux/
HDtime.h50 struct timeval tv; in ns_to_timeval() local
54 tv.tv_sec = 0; in ns_to_timeval()
55 tv.tv_usec = 0; in ns_to_timeval()
56 return (tv); in ns_to_timeval()
59 tv.tv_sec = nsec / NSEC_PER_SEC; in ns_to_timeval()
62 tv.tv_sec--; in ns_to_timeval()
65 tv.tv_usec = rem / 1000; in ns_to_timeval()
66 return (tv); in ns_to_timeval()
70 timeval_to_ns(const struct timeval *tv) in timeval_to_ns() argument
72 return ((int64_t)tv->tv_sec * NSEC_PER_SEC) + in timeval_to_ns()
[all …]
/freebsd-14-stable/contrib/ntp/sntp/libevent/test/
HDtest-time.c63 struct timeval tv; in time_cb() local
71 tv.tv_sec = 0; in time_cb()
72 tv.tv_usec = rand_int(50000); in time_cb()
73 if (tv.tv_usec % 2 || called < NEVENT) in time_cb()
74 evtimer_add(ev[j], &tv); in time_cb()
85 struct timeval tv; in main() local
107 tv.tv_sec = 0; in main()
108 tv.tv_usec = rand_int(50000); in main()
109 evtimer_add(ev[i], &tv); in main()
/freebsd-14-stable/contrib/libevent/test/
HDtest-time.c63 struct timeval tv; in time_cb() local
71 tv.tv_sec = 0; in time_cb()
72 tv.tv_usec = rand_int(50000); in time_cb()
73 if (tv.tv_usec % 2 || called < NEVENT) in time_cb()
74 evtimer_add(ev[j], &tv); in time_cb()
85 struct timeval tv; in main() local
107 tv.tv_sec = 0; in main()
108 tv.tv_usec = rand_int(50000); in main()
109 evtimer_add(ev[i], &tv); in main()
/freebsd-14-stable/sys/netinet/
HDtcp_hpts.h205 struct timeval tv; in tcp_gethptstick() local
208 sv = &tv; in tcp_gethptstick()
214 tcp_get_u64_usecs(struct timeval *tv) in tcp_get_u64_usecs() argument
218 if (tv == NULL) in tcp_get_u64_usecs()
219 tv = &tvd; in tcp_get_u64_usecs()
220 microuptime(tv); in tcp_get_u64_usecs()
221 return (tcp_tv_to_lusectick(tv)); in tcp_get_u64_usecs()
225 tcp_get_usecs(struct timeval *tv) in tcp_get_usecs() argument
229 if (tv == NULL) in tcp_get_usecs()
230 tv = &tvd; in tcp_get_usecs()
[all …]
/freebsd-14-stable/contrib/xz/src/xz/
HDmytime.c70 struct timespec tv; in mytime_now()
77 while (clock_gettime(clk_id, &tv)) in mytime_now()
80 clock_gettime(CLOCK_REALTIME, &tv); in mytime_now()
83 return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_nsec / 1000000); in mytime_now()
86 struct timeval tv; in mytime_now()
87 gettimeofday(&tv, NULL); in mytime_now()
88 return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_usec / 1000); in mytime_now()
/freebsd-14-stable/crypto/heimdal/lib/krb5/
HDtime.c55 struct timeval tv; in krb5_set_real_time() local
57 gettimeofday(&tv, NULL); in krb5_set_real_time()
59 context->kdc_sec_offset = sec - tv.tv_sec; in krb5_set_real_time()
66 context->kdc_usec_offset = usec - tv.tv_usec; in krb5_set_real_time()
73 context->kdc_usec_offset = tv.tv_usec; in krb5_set_real_time()
99 struct timeval tv; in krb5_us_timeofday() local
101 gettimeofday (&tv, NULL); in krb5_us_timeofday()
103 *sec = tv.tv_sec + context->kdc_sec_offset; in krb5_us_timeofday()
104 *usec = tv.tv_usec; /* XXX */ in krb5_us_timeofday()
/freebsd-14-stable/sys/contrib/libsodium/test/default/
HDxchacha20.c32 const HChaCha20TV *tv; in tv_hchacha20() local
46 tv = &tvs[i]; in tv_hchacha20()
48 tv->key, strlen(tv->key), NULL, NULL, NULL); in tv_hchacha20()
50 tv->in, strlen(tv->in), NULL, NULL, NULL); in tv_hchacha20()
52 tv->out, strlen(tv->out), NULL, NULL, NULL); in tv_hchacha20()
104 const XChaCha20TV *tv; in tv_stream_xchacha20() local
117 tv = &tvs[i]; in tv_stream_xchacha20()
120 tv->key, strlen(tv->key), NULL, NULL, NULL); in tv_stream_xchacha20()
122 tv->nonce, strlen(tv->nonce), NULL, NULL, NULL); in tv_stream_xchacha20()
124 tv->out, strlen(tv->out), NULL, &out_len, NULL); in tv_stream_xchacha20()
[all …]
/freebsd-14-stable/contrib/pf/libevent/
HDevent.c348 event_loopexit(struct timeval *tv) in event_loopexit() argument
351 current_base, tv)); in event_loopexit()
355 event_base_loopexit(struct event_base *event_base, struct timeval *tv) in event_base_loopexit() argument
358 event_base, tv)); in event_base_loopexit()
374 struct timeval tv; in event_base_loop() local
402 gettime(&tv); in event_base_loop()
403 if (timercmp(&tv, &base->event_tv, <)) { in event_base_loop()
407 timersub(&base->event_tv, &tv, &off); in event_base_loop()
410 base->event_tv = tv; in event_base_loop()
413 timeout_next(base, &tv); in event_base_loop()
[all …]
/freebsd-14-stable/contrib/ntp/sntp/libevent/sample/
HDtime-test.c59 struct timeval tv; in timeout_cb() local
60 evutil_timerclear(&tv); in timeout_cb()
61 tv.tv_sec = 2; in timeout_cb()
62 event_add(timeout, &tv); in timeout_cb()
70 struct timeval tv; in main() local
97 evutil_timerclear(&tv); in main()
98 tv.tv_sec = 2; in main()
99 event_add(&timeout, &tv); in main()
/freebsd-14-stable/contrib/libevent/sample/
HDtime-test.c59 struct timeval tv; in timeout_cb() local
60 evutil_timerclear(&tv); in timeout_cb()
61 tv.tv_sec = 2; in timeout_cb()
62 event_add(timeout, &tv); in timeout_cb()
70 struct timeval tv; in main() local
97 evutil_timerclear(&tv); in main()
98 tv.tv_sec = 2; in main()
99 event_add(&timeout, &tv); in main()
/freebsd-14-stable/contrib/netbsd-tests/lib/librumphijack/
HDh_client.c52 struct timeval tv; in main() local
56 tv.tv_sec = 0; in main()
57 tv.tv_usec = 1; in main()
64 rv = select(pipefd[0]+1, &rfds, NULL, NULL, &tv); in main()
75 struct timeval tv; in main() local
78 tv.tv_sec = 0; in main()
79 tv.tv_usec = 1; in main()
83 rv = select(100, &fds, &fds, &fds, &tv); in main()
89 rv = select(0, NULL, NULL, NULL, &tv); in main()
/freebsd-14-stable/lib/libc/gen/
HDutime.c41 struct timeval tv[2], *tvp; in utime() local
44 tv[0].tv_sec = times->actime; in utime()
45 tv[1].tv_sec = times->modtime; in utime()
46 tv[0].tv_usec = tv[1].tv_usec = 0; in utime()
47 tvp = tv; in utime()
/freebsd-14-stable/contrib/ntp/sntp/libevent/include/event2/
HDevent_compat.h198 #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
/freebsd-14-stable/contrib/libevent/include/event2/
HDevent_compat.h198 #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

12345678910>>...24