Home
last modified time | relevance | path

Searched refs:tv_nsec (Results 1 – 25 of 51) sorted by relevance

123

/tools/testing/selftests/mqueue/
Dmq_perf_tests.c359 (middle.tv_nsec - start.tv_nsec); \
360 send_total.tv_nsec += nsec; \
361 if (send_total.tv_nsec >= 1000000000) { \
363 send_total.tv_nsec -= 1000000000; \
366 (end.tv_nsec - middle.tv_nsec); \
367 recv_total.tv_nsec += nsec; \
368 if (recv_total.tv_nsec >= 1000000000) { \
370 recv_total.tv_nsec -= 1000000000; \
449 printf("\t\tClock resolution:\t\t%lu nsec%s\n", res.tv_nsec, in perf_test_thread()
450 res.tv_nsec > 1 ? "s" : ""); in perf_test_thread()
[all …]
/tools/testing/radix-tree/
Dbenchmark.c39 (finish.tv_nsec - start.tv_nsec); in benchmark_iter()
67 (finish.tv_nsec - start.tv_nsec); in benchmark_insert()
88 (finish.tv_nsec - start.tv_nsec); in benchmark_tagging()
109 (finish.tv_nsec - start.tv_nsec); in benchmark_delete()
/tools/testing/selftests/timers/
Dnanosleep.c86 if (a.tv_nsec > b.tv_nsec) in in_order()
93 ts.tv_nsec += ns; in timespec_add()
94 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
95 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
120 rel.tv_nsec = 0; in nanosleep_test()
Dmqueue-lat.c42 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
44 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
50 ts.tv_nsec += ns; in timespec_add()
51 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
52 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
Dnsleep-lat.c81 ts.tv_nsec += ns; in timespec_add()
82 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
83 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
92 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
94 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
105 target.tv_nsec = ns%NSEC_PER_SEC; in nanosleep_lat_test()
Dleap-a-day.c66 if (a.tv_nsec > b.tv_nsec) in in_order()
73 ts.tv_nsec += ns; in timespec_add()
74 while (ts.tv_nsec >= NSEC_PER_SEC) { in timespec_add()
75 ts.tv_nsec -= NSEC_PER_SEC; in timespec_add()
301 its1.it_value.tv_nsec = 0; in main()
303 its1.it_interval.tv_nsec = 0; in main()
308 ts.tv_nsec = 0; in main()
341 tai.tv_nsec, in main()
356 ts.tv_nsec = NSEC_PER_SEC / 2; in main()
Dalarmtimer-suspend.c89 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
91 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
109 ts.tv_nsec, delta_ns); in sigalarm()
152 start_time.tv_sec, start_time.tv_nsec); in main()
157 its1.it_interval.tv_nsec = 0; in main()
Dinconsistency-check.c87 if (a.tv_nsec > b.tv_nsec) in in_order()
130 list[i].tv_nsec); in consistency_test()
135 delta += list[inconsistent].tv_nsec; in consistency_test()
137 delta -= list[inconsistent+1].tv_nsec; in consistency_test()
Dthreadtest.c53 (b->tv_nsec < a->tv_nsec)) { in checklist()
66 printf("%lu:%lu\n", list[j].tv_sec, list[j].tv_nsec); in checklist()
Dset-timer-lat.c90 long long ret = NSEC_PER_SEC * b.tv_sec + b.tv_nsec; in timespec_sub()
92 ret -= NSEC_PER_SEC * a.tv_sec + a.tv_nsec; in timespec_sub()
159 its1.it_value.tv_nsec = 0; in setup_timer()
162 its1.it_interval.tv_nsec = 0; in setup_timer()
Dfreq-step.c45 return ts1->tv_sec - ts2->tv_sec + (ts1->tv_nsec - ts2->tv_nsec) / 1e9; in diff_timespec()
72 sample->time = ts1.tv_sec + ts1.tv_nsec / 1e9; in get_sample()
233 srand(ts.tv_sec ^ ts.tv_nsec); in init_test()
Draw_skew.c48 return ts.tv_sec * NSEC_PER_SEC + ts.tv_nsec; in ts_to_nsec()
56 ts.tv_nsec = ns%NSEC_PER_SEC; in nsec_to_ts()
/tools/testing/selftests/seccomp/
Dseccomp_benchmark.c35 i += finish.tv_nsec - start.tv_nsec; in timing()
38 finish.tv_sec, finish.tv_nsec, in timing()
39 start.tv_sec, start.tv_nsec, in timing()
/tools/testing/selftests/powerpc/benchmarks/
Dfutex_bench.c34 …printf("time = %.6f\n", ts_end.tv_sec - ts_start.tv_sec + (ts_end.tv_nsec - ts_start.tv_nsec) / 1e… in test_futex()
Dmmap_bench.c55 …printf("time = %.6f\n", ts_end.tv_sec - ts_start.tv_sec + (ts_end.tv_nsec - ts_start.tv_nsec) / 1e… in test_mmap()
Dnull_syscall.c146 (tv_now.tv_nsec - tv_start.tv_nsec); in main()
/tools/power/cpupower/utils/idle_monitor/
Dcpupower-monitor.c56 if ((end.tv_nsec - start.tv_nsec) < 0) { in timespec_diff_us()
58 temp.tv_nsec = 1000000000 + end.tv_nsec - start.tv_nsec; in timespec_diff_us()
61 temp.tv_nsec = end.tv_nsec - start.tv_nsec; in timespec_diff_us()
63 return (temp.tv_sec * 1000000) + (temp.tv_nsec / 1000); in timespec_diff_us()
/tools/testing/selftests/x86/
Dtest_vdso.c191 return a->tv_nsec <= b->tv_nsec; in ts_leq()
250 (unsigned long long)start.tv_sec, start.tv_nsec, in test_one_clock_gettime()
251 (unsigned long long)vdso.tv_sec, vdso.tv_nsec, in test_one_clock_gettime()
252 (unsigned long long)end.tv_sec, end.tv_nsec); in test_one_clock_gettime()
/tools/testing/selftests/powerpc/stringloops/
Dstrlen.c48 …f\n", test_strlen(s), ts_end.tv_sec - ts_start.tv_sec + (ts_end.tv_nsec - ts_start.tv_nsec) / 1e9); in bench_test()
/tools/power/acpi/os_specific/service_layers/
Dosunixxf.c791 time.tv_nsec += in acpi_os_wait_semaphore()
796 if (time.tv_nsec >= ACPI_NSEC_PER_SEC) { in acpi_os_wait_semaphore()
797 time.tv_sec += (time.tv_nsec / ACPI_NSEC_PER_SEC); in acpi_os_wait_semaphore()
798 time.tv_nsec = (time.tv_nsec % ACPI_NSEC_PER_SEC); in acpi_os_wait_semaphore()
/tools/leds/
Duledmon.c58 printf("[%ld.%09ld] %u\n", ts.tv_sec, ts.tv_nsec, brightness); in main()
Dled_hw_brightness_mon.c79 printf("[%ld.%09ld] %d\n", ts.tv_sec, ts.tv_nsec, atoi(buf)); in main()
/tools/testing/selftests/vm/
Dtranshuge-stress.c137 s = b.tv_sec - a.tv_sec + (b.tv_nsec - a.tv_nsec) / 1000000000.; in main()
/tools/testing/selftests/futex/functional/
Dfutex_requeue_pi.c294 secs = (ts.tv_nsec + timeout_ns) / 1000000000; in unit_test()
295 ts.tv_nsec = ((int64_t)ts.tv_nsec + timeout_ns) % 1000000000; in unit_test()
298 info("ts.tv_nsec = %ld\n", ts.tv_nsec); in unit_test()
Dfutex_wait_wouldblock.c41 struct timespec to = {.tv_sec = 0, .tv_nsec = timeout_ns}; in main()

123