| /tools/include/nolibc/sys/ |
| A D | time.h | 23 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 D | mkinitrd.sh | 39 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 D | vdso_test_gettimeofday.c | 38 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 D | vdso_test_abi.c | 29 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 D | leapcrash.c | 82 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 D | set-tz.c | 41 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 D | leap-a-day.c | 250 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 D | uptimeofday.c | 34 struct timespec tv = { in msec_to_timespec() local 39 return tv; in msec_to_timespec()
|
| /tools/testing/selftests/bpf/ |
| A D | io_helpers.c | 9 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 D | conntrack_reverse_clash.c | 44 static const struct timeval tv = { in udp_socket() local 52 setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); in udp_socket()
|
| A D | sctp_collision.c | 13 struct timeval tv = {25, 0}; in main() local 49 ret = setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); in main()
|
| A D | nf_queue.c | 213 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 D | rtctest.c | 200 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 D | acpidbg.c | 269 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 D | psock_snd.c | 253 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 D | io_uring_zerocopy_tx.c | 67 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 D | skf_net_off.c | 169 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 D | udpgso_bench_rx.c | 86 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 D | time.h | 155 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 D | evlist-open-close.c | 28 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 D | get_stack_raw_tp.c | 93 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 D | iou-zcrx.c | 81 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 D | arch_timer_edge_cases.c | 200 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 D | sock.c | 37 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 D | context_switch.c | 34 struct timeval tv; variable 58 gettimeofday(&tv, NULL); in touch() 71 asm volatile("# %0 %1 %2": : "r"(&tv), "r"(&fp), "r"(&c)); in touch()
|