Home
last modified time | relevance | path

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

12

/tools/testing/selftests/vDSO/
Dvdso_test.c48 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); in main()
56 struct timeval tv; in main() local
57 long ret = gtod(&tv, 0); in main()
61 (long long)tv.tv_sec, (long long)tv.tv_usec); in main()
Dvdso_standalone_test_x86.c90 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); in c_main()
96 struct timeval tv; in c_main() local
97 long ret = gtod(&tv, 0); in c_main()
101 to_base10(buf + 31, tv.tv_sec); in c_main()
102 to_base10(buf + 38, tv.tv_usec); in c_main()
/tools/testing/selftests/rcutorture/bin/
Dmkinitrd.sh89 struct timeval tv;
100 if (gettimeofday(&tv, NULL))
102 tv.tv_sec -= tvb.tv_sec;
103 if (tv.tv_sec > 1)
105 tv.tv_usec += tv.tv_sec * 1000 * 1000;
106 tv.tv_usec -= tvb.tv_usec;
107 } while (tv.tv_usec < 1000);
/tools/testing/selftests/timers/
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()
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()
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/testing/selftests/rtc/
Drtctest.c90 struct timeval tv = { .tv_sec = 2 }; in TEST_F() local
96 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
113 struct timeval tv = { .tv_sec = ALARM_DELTA + 2 }; in TEST_F() local
146 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
166 struct timeval tv = { .tv_sec = ALARM_DELTA + 2 }; in TEST_F() local
200 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv); in TEST_F()
215 struct timeval tv = { .tv_sec = 62 }; variable
248 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv);
268 struct timeval tv = { .tv_sec = 62 }; variable
302 rc = select(self->fd + 1, &readfds, NULL, NULL, &tv);
/tools/power/acpi/tools/acpidbg/
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/
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()
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()
Dso_txtime.c253 struct timeval tv = { .tv_usec = 100 * 1000 }; in setup_rx() local
263 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in setup_rx()
Dudpgso_bench_tx.c98 struct timeval tv; in gettimeofday_ms() local
100 gettimeofday(&tv, NULL); in gettimeofday_ms()
101 return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); in gettimeofday_ms()
Dip_defrag.c341 struct timeval tv = { .tv_sec = 1, .tv_usec = 10 }; in run_test() local
360 if (setsockopt(fd_rx_udp, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in run_test()
Dmsg_zerocopy.c101 struct timeval tv; in gettimeofday_ms() local
103 gettimeofday(&tv, NULL); in gettimeofday_ms()
104 return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); in gettimeofday_ms()
Dudpgso.c573 struct timeval tv = { .tv_usec = 100 * 1000 }; in run_test() local
584 if (setsockopt(fdr, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv))) in run_test()
/tools/testing/selftests/x86/
Dtest_vdso.c39 typedef long (*vgtod_t)(struct timeval *tv, struct timezone *tz);
129 static inline int sys_gettimeofday(struct timeval *tv, struct timezone *tz) in sys_gettimeofday() argument
131 return syscall(__NR_gettimeofday, tv, tz); in sys_gettimeofday()
Dtest_vsyscall.c55 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
159 static inline long sys_gtod(struct timeval *tv, struct timezone *tz) in sys_gtod() argument
161 return syscall(SYS_gettimeofday, tv, tz); in sys_gtod()
/tools/testing/selftests/bpf/prog_tests/
Dget_stack_raw_tp.c91 struct timespec tv = {0, 10}; in test_get_stack_raw_tp() local
134 nanosleep(&tv, NULL); in test_get_stack_raw_tp()
/tools/testing/selftests/networking/timestamping/
Dtimestamping.c141 struct timeval tv; in printpacket() local
242 if (ioctl(sock, SIOCGSTAMP, &tv)) in printpacket()
246 (long)tv.tv_sec, in printpacket()
247 (long)tv.tv_usec); in printpacket()
/tools/testing/selftests/powerpc/benchmarks/
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()
/tools/perf/util/
Dtime-utils.c546 struct timeval tv; in fetch_current_timestamp() local
550 if (gettimeofday(&tv, NULL) || !localtime_r(&tv.tv_sec, &tm)) in fetch_current_timestamp()
556 scnprintf(buf, sz, "%s%02u", dt, (unsigned)tv.tv_usec / 10000); in fetch_current_timestamp()
/tools/thermal/tmon/
Dtmon.h45 struct timeval tv; member
/tools/testing/selftests/bpf/
Dtest_flow_dissector.c113 struct timeval tv; in INIT_ADDR4() local
115 gettimeofday(&tv, NULL); in INIT_ADDR4()
116 return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); in INIT_ADDR4()
Dtest_sock_addr.c1321 struct timeval tv; in recvmsg_from_client() local
1330 tv.tv_sec = 2; in recvmsg_from_client()
1331 tv.tv_usec = 0; in recvmsg_from_client()
1333 if (select(sockfd + 1, &rfds, NULL, NULL, &tv) <= 0 || in recvmsg_from_client()
/tools/perf/
Dbuiltin-kvm.c593 struct timeval tv; in show_timeofday() local
596 gettimeofday(&tv, NULL); in show_timeofday()
597 if (localtime_r(&tv.tv_sec, &ltime)) { in show_timeofday()
599 pr_info("%s.%06ld", date, tv.tv_usec); in show_timeofday()

12