/tools/testing/selftests/vDSO/ |
D | vdso_test.c | 48 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()
|
D | vdso_standalone_test_x86.c | 90 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/ |
D | mkinitrd.sh | 89 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/ |
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()
|
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()
|
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/testing/selftests/rtc/ |
D | rtctest.c | 90 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/ |
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/ |
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()
|
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()
|
D | so_txtime.c | 253 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()
|
D | udpgso_bench_tx.c | 98 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()
|
D | ip_defrag.c | 341 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()
|
D | msg_zerocopy.c | 101 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()
|
D | udpgso.c | 573 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/ |
D | test_vdso.c | 39 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()
|
D | test_vsyscall.c | 55 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/ |
D | get_stack_raw_tp.c | 91 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/ |
D | timestamping.c | 141 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/ |
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()
|
/tools/perf/util/ |
D | time-utils.c | 546 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/ |
D | tmon.h | 45 struct timeval tv; member
|
/tools/testing/selftests/bpf/ |
D | test_flow_dissector.c | 113 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()
|
D | test_sock_addr.c | 1321 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/ |
D | builtin-kvm.c | 593 struct timeval tv; in show_timeofday() local 596 gettimeofday(&tv, NULL); in show_timeofday() 597 if (localtime_r(&tv.tv_sec, <ime)) { in show_timeofday() 599 pr_info("%s.%06ld", date, tv.tv_usec); in show_timeofday()
|