Home
last modified time | relevance | path

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

12345678910>>...24

/freebsd/tests/sys/kern/acct/
H A Dacct_test.c79 struct timeval tv; in ATF_TC_BODY() local
81 tv.tv_sec = 0; in ATF_TC_BODY()
82 tv.tv_usec = 0; in ATF_TC_BODY()
83 v.c = encode_timeval(tv); in ATF_TC_BODY()
110 struct timeval tv; in ATF_TC_BODY() local
112 tv.tv_sec = 1; in ATF_TC_BODY()
113 tv.tv_usec = 0; in ATF_TC_BODY()
114 v.c = encode_timeval(tv); in ATF_TC_BODY()
116 (float)tv.tv_sec * AHZ + tv.tv_usec, v); in ATF_TC_BODY()
127 struct timeval tv; in ATF_TC_BODY() local
[all …]
/freebsd/contrib/ntp/libntp/lib/isc/unix/
H A Dstdtime.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 …]
H A Dtime.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/usr.sbin/ypserv/common/
H A Dyplib_host.c68 struct timeval tv; in yp_bind_host() local
92 tv.tv_sec = 10; in yp_bind_host()
93 tv.tv_usec = 0; in yp_bind_host()
99 client = clntudp_create(&rsrv_sin, program, version, tv, in yp_bind_host()
115 struct timeval tv; in yp_bind_local() local
124 tv.tv_sec = 10; in yp_bind_local()
125 tv.tv_usec = 0; in yp_bind_local()
127 client = clntudp_create(&rsrv_sin, program, version, tv, &rsrv_sock); in yp_bind_local()
141 struct timeval tv; in yp_match_host() local
147 tv.tv_sec = _yplib_host_timeout; in yp_match_host()
[all …]
/freebsd/tools/regression/poll/
H A Dpipeselect.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/tools/regression/priv/
H A Dpriv_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/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()
80 tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000; 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()
84 tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000; in utimensat()
[all …]
/freebsd/contrib/ntp/sntp/libevent/
H A Devutil_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/contrib/libevent/
H A Devutil_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/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/sys/netinet/
H A Dtcp_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/sys/contrib/libsodium/test/default/
H A Dxchacha20.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/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/contrib/pf/libevent/
H A Devent.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/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/contrib/ntp/sntp/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
/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
/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; \

12345678910>>...24