Home
last modified time | relevance | path

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

12345678910>>...24

/freebsd/tests/sys/kern/acct/
H A Dacct_test.c81 tv.tv_sec = 0; in ATF_TC_BODY()
112 tv.tv_sec = 1; in ATF_TC_BODY()
116 (float)tv.tv_sec * AHZ + tv.tv_usec, v); in ATF_TC_BODY()
129 tv.tv_sec = 0; in ATF_TC_BODY()
133 (float)tv.tv_sec * AHZ + tv.tv_usec, v); in ATF_TC_BODY()
146 tv.tv_sec = 1; in ATF_TC_BODY()
150 (float)tv.tv_sec * AHZ + tv.tv_usec, v); in ATF_TC_BODY()
165 tv.tv_sec = 1; in ATF_TC_BODY()
169 (float)tv.tv_sec * AHZ + tv.tv_usec, v); in ATF_TC_BODY()
189 (float)tv.tv_sec * AHZ + tv.tv_usec, v); in ATF_TC_BODY()
[all …]
/freebsd/contrib/ntp/libntp/lib/isc/unix/
H A Dstdtime.c44 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()
53 tv->tv_sec += 1; in fix_tv_usec()
54 tv->tv_usec -= US_PER_S; in fix_tv_usec()
67 struct timeval tv; in isc_stdtime_get() local
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()
[all …]
H A Dtime.c65 if (tv->tv_usec < 0) { in fix_tv_usec()
68 tv->tv_sec -= 1; in fix_tv_usec()
74 tv->tv_sec += 1; in fix_tv_usec()
147 struct timeval tv; in isc_time_now() local
166 fix_tv_usec(&tv); in isc_time_now()
167 if (tv.tv_sec < 0) in isc_time_now()
170 if (tv.tv_sec < 0 || tv.tv_usec < 0 || tv.tv_usec >= US_PER_S) in isc_time_now()
189 struct timeval tv; in isc_time_nowplusinterval() local
210 fix_tv_usec(&tv); in isc_time_nowplusinterval()
211 if (tv.tv_sec < 0) in isc_time_nowplusinterval()
[all …]
/freebsd/usr.sbin/ypserv/common/
H A Dyplib_host.c92 tv.tv_sec = 10; in yp_bind_host()
93 tv.tv_usec = 0; in yp_bind_host()
124 tv.tv_sec = 10; in yp_bind_local()
125 tv.tv_usec = 0; in yp_bind_local()
148 tv.tv_usec = 0; in yp_match_host()
186 tv.tv_usec = 0; in yp_first_host()
225 tv.tv_usec = 0; in yp_next_host()
262 tv.tv_usec = 0; in yp_all_host()
287 tv.tv_usec = 0; in yp_order_host()
314 tv.tv_usec = 0; in yp_master_host()
[all …]
/freebsd/tools/regression/poll/
H A Dpipeselect.c22 (tv).tv_sec = 0; \
23 (tv).tv_usec = 0; \
62 struct timeval tv; in child() local
75 SETUP(fd, rfds, tv); in child()
106 SETUP(fd, rfds, tv); in child()
115 SETUP(fd, rfds, tv); in child()
121 SETUP(fd, rfds, tv); in child()
130 SETUP(fd, rfds, tv); in child()
146 SETUP(fd, rfds, tv); in child()
155 SETUP(fd, rfds, tv); in child()
[all …]
/freebsd/tools/regression/priv/
H A Dpriv_vfs_utimes.c93 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()
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()
139 tv[1].tv_usec = 0; in priv_vfs_utimes_fowner()
177 tv[0].tv_sec = 0; in priv_vfs_utimes_fother()
178 tv[0].tv_usec = 0; in priv_vfs_utimes_fother()
[all …]
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/hkdf/
H A Dhkdf_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/tools/build/
H A Dfutimens.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()
88 tv[0] = now; in futimens()
[all …]
H A Dutimensat.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()
92 tv[0] = now; in utimensat()
[all …]
/freebsd/contrib/ntp/sntp/libevent/
H A Devutil_time.c93 if (tv == NULL) in evutil_gettimeofday()
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_()
143 if (!tv) in evutil_usleep_()
151 usec = tv->tv_sec * 1000000LL + tv->tv_usec; in evutil_usleep_()
173 sleep(tv->tv_sec); in evutil_usleep_()
174 usleep(tv->tv_usec); in evutil_usleep_()
232 struct timeval *tv) in adjust_monotonic_time() argument
234 evutil_timeradd(tv, &base->adjust_monotonic_clock, tv); in adjust_monotonic_time()
242 *tv = base->last_time; in adjust_monotonic_time()
[all …]
/freebsd/contrib/libevent/
H A Devutil_time.c93 if (tv == NULL) in evutil_gettimeofday()
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_()
143 if (!tv) in evutil_usleep_()
151 usec = tv->tv_sec * 1000000LL + tv->tv_usec; in evutil_usleep_()
173 sleep(tv->tv_sec); in evutil_usleep_()
174 usleep(tv->tv_usec); in evutil_usleep_()
232 struct timeval *tv) in adjust_monotonic_time() argument
234 evutil_timeradd(tv, &base->adjust_monotonic_clock, tv); in adjust_monotonic_time()
242 *tv = base->last_time; in adjust_monotonic_time()
[all …]
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dtime.h48 struct timeval tv; in ns_to_timeval() local
52 tv.tv_sec = 0; in ns_to_timeval()
53 tv.tv_usec = 0; in ns_to_timeval()
54 return (tv); in ns_to_timeval()
57 tv.tv_sec = nsec / NSEC_PER_SEC; in ns_to_timeval()
60 tv.tv_sec--; in ns_to_timeval()
63 tv.tv_usec = rem / 1000; in ns_to_timeval()
64 return (tv); in ns_to_timeval()
68 timeval_to_ns(const struct timeval *tv) in timeval_to_ns() argument
70 return ((int64_t)tv->tv_sec * NSEC_PER_SEC) + in timeval_to_ns()
[all …]
/freebsd/contrib/ntp/sntp/libevent/test/
H A Dtest-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/contrib/libevent/test/
H A Dtest-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/contrib/xz/src/xz/
H A Dmytime.c38 struct timespec tv; in mytime_now() local
39 while (clock_gettime(clk_id, &tv)) in mytime_now()
42 return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_nsec / 1000000); in mytime_now()
44 struct timeval tv; in mytime_now()
45 gettimeofday(&tv, NULL); in mytime_now()
46 return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_usec / 1000); in mytime_now()
/freebsd/sys/netinet/
H A Dtcp_hpts.h205 struct timeval tv; in tcp_gethptstick() local
208 sv = &tv; in tcp_gethptstick()
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()
231 microuptime(tv); in tcp_get_usecs()
[all …]
/freebsd/crypto/heimdal/lib/krb5/
H A Dtime.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/sys/contrib/libsodium/test/default/
H A Dxchacha20.c46 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()
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()
233 tv->key, strlen(tv->key), NULL, NULL, NULL); in tv_secretbox_xchacha20poly1305()
235 tv->nonce, strlen(tv->nonce), NULL, NULL, NULL); in tv_secretbox_xchacha20poly1305()
[all …]
/freebsd/contrib/pf/libevent/
H A Devent.c351 current_base, tv)); in event_loopexit()
358 event_base, tv)); in event_base_loopexit()
374 struct timeval tv; in event_base_loop() local
402 gettime(&tv); in event_base_loop()
410 base->event_tv = tv; in event_base_loop()
415 timerclear(&tv); in event_base_loop()
483 if (tv == NULL) { in event_once()
485 tv = &etv; in event_once()
608 if (tv != NULL) { in event_add()
722 *tv = dflt; in timeout_next()
[all …]
/freebsd/contrib/ntp/sntp/libevent/sample/
H A Dtime-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/contrib/libevent/sample/
H A Dtime-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/contrib/netbsd-tests/lib/librumphijack/
H A Dh_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/lib/libc/gen/
H A Dutime.c39 struct timeval tv[2], *tvp; in utime() local
42 tv[0].tv_sec = times->actime; in utime()
43 tv[1].tv_sec = times->modtime; in utime()
44 tv[0].tv_usec = tv[1].tv_usec = 0; in utime()
45 tvp = tv; in utime()
/freebsd/sys/sys/
H A Dtimespec.h39 #define TIMEVAL_TO_TIMESPEC(tv, ts) \ argument
41 (ts)->tv_sec = (tv)->tv_sec; \
42 (ts)->tv_nsec = (tv)->tv_usec * 1000; \
44 #define TIMESPEC_TO_TIMEVAL(tv, ts) \ argument
46 (tv)->tv_sec = (ts)->tv_sec; \
47 (tv)->tv_usec = (ts)->tv_nsec / 1000; \
/freebsd/contrib/libevent/include/event2/
H A Devent_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