Home
last modified time | relevance | path

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

12

/tools/include/nolibc/sys/
A Dtime.h23 int sys_gettimeofday(struct timeval *tv, struct timezone *tz) in sys_gettimeofday() argument
26 return my_syscall2(__NR_gettimeofday, tv, tz); in sys_gettimeofday()
34 if (!ret && tv) { in sys_gettimeofday()
35 tv->tv_sec = tp.tv_sec; in sys_gettimeofday()
36 tv->tv_usec = tp.tv_nsec / 1000; in sys_gettimeofday()
44 int gettimeofday(struct timeval *tv, struct timezone *tz) in gettimeofday() argument
46 return __sysret(sys_gettimeofday(tv, tz)); in gettimeofday()
/tools/testing/selftests/rcutorture/bin/
A Dmkinitrd.sh39 struct timeval tv;
54 if (gettimeofday(&tv, NULL))
56 tv.tv_sec -= tvb.tv_sec;
57 if (tv.tv_sec > 1)
59 tv.tv_usec += tv.tv_sec * 1000 * 1000;
60 tv.tv_usec -= tvb.tv_usec;
61 } while (tv.tv_usec < 1000);
/tools/testing/selftests/vDSO/
A Dvdso_test_gettimeofday.c38 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); in main()
46 struct timeval tv; in main() local
47 long ret = VDSO_CALL(gtod, 2, &tv, 0); in main()
51 (long long)tv.tv_sec, (long long)tv.tv_usec); in main()
A Dvdso_test_abi.c29 typedef long (*vdso_gettimeofday_t)(struct timeval *tv, struct timezone *tz);
61 struct timeval tv; in vdso_test_gettimeofday() local
62 long ret = VDSO_CALL(vdso_gettimeofday, 2, &tv, 0); in vdso_test_gettimeofday()
66 (long long)tv.tv_sec, (long long)tv.tv_usec); in vdso_test_gettimeofday()
/tools/testing/selftests/timers/
A Dleapcrash.c82 struct timeval tv; in main() local
86 tv.tv_sec = next_leap - 2; in main()
87 tv.tv_usec = 0; in main()
88 if (settimeofday(&tv, NULL)) { in main()
A Dset-tz.c41 struct timeval tv; in get_tz_min() local
44 gettimeofday(&tv, &tz); in get_tz_min()
51 struct timeval tv; in get_tz_dst() local
54 gettimeofday(&tv, &tz); in get_tz_dst()
A Dleap-a-day.c250 struct timeval tv; in main() local
252 tv.tv_sec = next_leap - 10; in main()
253 tv.tv_usec = 0; in main()
254 settimeofday(&tv, NULL); in main()
255 printf("Setting time to %s", ctime(&tv.tv_sec)); in main()
/tools/thermal/lib/
A Duptimeofday.c34 struct timespec tv = { in msec_to_timespec() local
39 return tv; in msec_to_timespec()
/tools/testing/selftests/bpf/
A Dio_helpers.c9 struct timeval tv = { usec / M, usec % M }; in read_with_timeout() local
15 err = select(fd + 1, &fds, NULL, NULL, &tv); in read_with_timeout()
/tools/testing/selftests/net/netfilter/
A Dconntrack_reverse_clash.c44 static const struct timeval tv = { in udp_socket() local
52 setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); in udp_socket()
A Dsctp_collision.c13 struct timeval tv = {25, 0}; in main() local
49 ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); in main()
A Dnf_queue.c213 struct timeval tv; in open_queue() local
247 memset(&tv, 0, sizeof(tv)); in open_queue()
248 tv.tv_sec = opts.timeout; in open_queue()
251 &tv, sizeof(tv))) { in open_queue()
/tools/testing/selftests/rtc/
A Drtctest.c200 struct timeval tv = { .tv_sec = 2 }; in TEST_F() local
206 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
223 struct timeval tv = { .tv_sec = ALARM_DELTA + 2 }; in TEST_F() local
272 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
292 struct timeval tv = { .tv_sec = ALARM_DELTA + 2 }; in TEST_F() local
342 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
357 struct timeval tv = { .tv_sec = 62 }; variable
404 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv);
424 struct timeval tv = { .tv_sec = 62 }; variable
472 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv);
/tools/power/acpi/tools/acpidbg/
A Dacpidbg.c269 struct timeval tv; in acpi_aml_loop() local
283 tv.tv_sec = ACPI_AML_SEC_TICK; in acpi_aml_loop()
284 tv.tv_usec = 0; in acpi_aml_loop()
306 ret = select(maxfd+1, &rfds, &wfds, NULL, &tv); in acpi_aml_loop()
339 struct timeval tv; in acpi_aml_readable() local
343 tv.tv_sec = 0; in acpi_aml_readable()
344 tv.tv_usec = ACPI_AML_USEC_PEEK; in acpi_aml_readable()
347 ret = select(maxfd+1, &rfds, NULL, NULL, &tv); in acpi_aml_readable()
/tools/testing/selftests/net/
A Dpsock_snd.c253 struct timeval tv = { .tv_usec = 100 * 1000 }; in setup_rx() local
261 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in setup_rx()
292 struct timeval tv = { .tv_usec = 100 * 1000 }; in setup_sniffer() local
299 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in setup_sniffer()
A Dio_uring_zerocopy_tx.c67 struct timeval tv; in gettimeofday_ms() local
69 gettimeofday(&tv, NULL); in gettimeofday_ms()
70 return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); in gettimeofday_ms()
A Dskf_net_off.c169 struct timeval tv = { .tv_usec = 100 * 1000 }; in raw_read() local
176 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in raw_read()
A Dudpgso_bench_rx.c86 struct timeval tv; in gettimeofday_ms() local
88 gettimeofday(&tv, NULL); in gettimeofday_ms()
89 return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); in gettimeofday_ms()
/tools/include/nolibc/
A Dtime.h155 struct timeval tv; in time() local
158 sys_gettimeofday(&tv, NULL); in time()
161 *tptr = tv.tv_sec; in time()
162 return tv.tv_sec; in time()
/tools/perf/bench/
A Devlist-open-close.c28 static inline u64 timeval2usec(struct timeval *tv) in timeval2usec() argument
30 return tv->tv_sec * USEC_PER_SEC + tv->tv_usec; in timeval2usec()
/tools/testing/selftests/bpf/prog_tests/
A Dget_stack_raw_tp.c93 struct timespec tv = {0, 10}; in test_get_stack_raw_tp() local
136 nanosleep(&tv, NULL); in test_get_stack_raw_tp()
/tools/testing/selftests/drivers/net/hw/
A Diou-zcrx.c81 struct timeval tv; in gettimeofday_ms() local
83 gettimeofday(&tv, NULL); in gettimeofday_ms()
84 return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); in gettimeofday_ms()
/tools/testing/selftests/kvm/arm64/
A Darch_timer_edge_cases.c200 enum timer_view tv) in set_xval_irq() argument
202 switch (tv) { in set_xval_irq()
325 enum timer_view tv, irq_wait_method_t wm, bool reset_state, in test_timer_xval() argument
333 set_xval_irq(timer, xval, CTL_ENABLE, tv); in test_timer_xval()
643 irq_wait_method_t wm, enum timer_view tv) in test_set_cnt_after_xval() argument
650 set_xval_irq(timer, xval, CTL_ENABLE, tv); in test_set_cnt_after_xval()
668 enum timer_view tv) in test_set_cnt_after_xval_no_irq() argument
675 set_xval_irq(timer, xval, CTL_ENABLE, tv); in test_set_cnt_after_xval_no_irq()
/tools/testing/selftests/net/tcp_ao/lib/
A Dsock.c37 static int __test_wait_fd(int sk, struct timeval *tv, bool write) in __test_wait_fd() argument
50 ret = select(sk + 1, NULL, &fds, &efds, tv); in __test_wait_fd()
52 ret = select(sk + 1, &fds, NULL, &efds, tv); in __test_wait_fd()
69 struct timeval tv = { .tv_sec = sec, }; in test_wait_fd() local
71 return __test_wait_fd(sk, sec ? &tv : NULL, write); in test_wait_fd()
97 struct timeval tv = { .tv_usec = POLL_USEC, }; in __test_skpair_poll() local
100 ret = __test_wait_fd(sk, &tv, write); in __test_skpair_poll()
/tools/testing/selftests/powerpc/benchmarks/
A Dcontext_switch.c34 struct timeval tv; variable
58 gettimeofday(&tv, NULL); in touch()
71 asm volatile("# %0 %1 %2": : "r"(&tv), "r"(&fp), "r"(&c)); in touch()

Completed in 32 milliseconds

12