Home
last modified time | relevance | path

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

/tools/testing/selftests/vDSO/
Dvdso_test.c33 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); in main()
41 struct timeval tv; in main() local
42 long ret = gtod(&tv, 0); in main()
46 (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/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()
Drtctest.c155 struct timeval tv = {5, 0}; /* 5 second timeout on select */ in main() local
161 retval = select(fd+1, &readfds, NULL, NULL, &tv); in main()
/tools/perf/util/
Dtime-utils.c132 struct timeval tv; in fetch_current_timestamp() local
136 if (gettimeofday(&tv, NULL) || !localtime_r(&tv.tv_sec, &tm)) in fetch_current_timestamp()
142 scnprintf(buf, sz, "%s%02u", dt, (unsigned)tv.tv_usec / 10000); in fetch_current_timestamp()
/tools/power/acpi/tools/acpidbg/
Dacpidbg.c272 struct timeval tv; in acpi_aml_loop() local
286 tv.tv_sec = ACPI_AML_SEC_TICK; in acpi_aml_loop()
287 tv.tv_usec = 0; in acpi_aml_loop()
309 ret = select(maxfd+1, &rfds, &wfds, NULL, &tv); in acpi_aml_loop()
342 struct timeval tv; in acpi_aml_readable() local
346 tv.tv_sec = 0; in acpi_aml_readable()
347 tv.tv_usec = ACPI_AML_USEC_PEEK; in acpi_aml_readable()
350 ret = select(maxfd+1, &rfds, NULL, NULL, &tv); in acpi_aml_readable()
/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.c54 typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
164 static inline long sys_gtod(struct timeval *tv, struct timezone *tz) in sys_gtod() argument
166 return syscall(SYS_gettimeofday, tv, tz); in sys_gtod()
/tools/testing/selftests/powerpc/benchmarks/
Dcontext_switch.c36 struct timeval tv; variable
60 gettimeofday(&tv, NULL); in touch()
73 asm volatile("# %0 %1 %2": : "r"(&tv), "r"(&fp), "r"(&c)); in touch()
/tools/testing/selftests/networking/timestamping/
Dtimestamping.c160 struct timeval tv; in printpacket() local
261 if (ioctl(sock, SIOCGSTAMP, &tv)) in printpacket()
265 (long)tv.tv_sec, in printpacket()
266 (long)tv.tv_usec); in printpacket()
Dtxtimestamp.c109 struct timeval tv; /* avoid dependency on -lrt */ in print_timestamp_usr() local
111 gettimeofday(&tv, NULL); in print_timestamp_usr()
112 ts.tv_sec = tv.tv_sec; in print_timestamp_usr()
113 ts.tv_nsec = tv.tv_usec * 1000; in print_timestamp_usr()
/tools/thermal/tmon/
Dtmon.h51 struct timeval tv; member
Dsysfs.c501 gettimeofday(&trec[next_thermal_record].tv, NULL); in update_thermal_data()
/tools/testing/selftests/net/
Dmsg_zerocopy.c97 struct timeval tv; in gettimeofday_ms() local
99 gettimeofday(&tv, NULL); in gettimeofday_ms()
100 return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); in gettimeofday_ms()
/tools/perf/
Dbuiltin-kvm.c585 struct timeval tv; in show_timeofday() local
588 gettimeofday(&tv, NULL); in show_timeofday()
589 if (localtime_r(&tv.tv_sec, &ltime)) { in show_timeofday()
591 pr_info("%s.%06ld", date, tv.tv_usec); in show_timeofday()
/tools/power/x86/turbostat/
Dturbostat.c791 struct timeval tv; in format_counters() local
793 timersub(&t->tv_end, &t->tv_begin, &tv); in format_counters()
794 outp += sprintf(outp, "%5ld\t", tv.tv_sec * 1000000 + tv.tv_usec); in format_counters()