/tools/testing/selftests/mqueue/ |
D | mq_perf_tests.c | 359 (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/ |
D | benchmark.c | 39 (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/ |
D | nanosleep.c | 86 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()
|
D | mqueue-lat.c | 42 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()
|
D | nsleep-lat.c | 81 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()
|
D | leap-a-day.c | 66 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()
|
D | alarmtimer-suspend.c | 89 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()
|
D | inconsistency-check.c | 87 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()
|
D | threadtest.c | 53 (b->tv_nsec < a->tv_nsec)) { in checklist() 66 printf("%lu:%lu\n", list[j].tv_sec, list[j].tv_nsec); in checklist()
|
D | set-timer-lat.c | 90 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()
|
D | freq-step.c | 45 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()
|
D | raw_skew.c | 48 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/ |
D | seccomp_benchmark.c | 35 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/ |
D | futex_bench.c | 34 …printf("time = %.6f\n", ts_end.tv_sec - ts_start.tv_sec + (ts_end.tv_nsec - ts_start.tv_nsec) / 1e… in test_futex()
|
D | mmap_bench.c | 55 …printf("time = %.6f\n", ts_end.tv_sec - ts_start.tv_sec + (ts_end.tv_nsec - ts_start.tv_nsec) / 1e… in test_mmap()
|
D | null_syscall.c | 146 (tv_now.tv_nsec - tv_start.tv_nsec); in main()
|
/tools/power/cpupower/utils/idle_monitor/ |
D | cpupower-monitor.c | 56 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/ |
D | test_vdso.c | 191 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/ |
D | strlen.c | 48 …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/ |
D | osunixxf.c | 791 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/ |
D | uledmon.c | 58 printf("[%ld.%09ld] %u\n", ts.tv_sec, ts.tv_nsec, brightness); in main()
|
D | led_hw_brightness_mon.c | 79 printf("[%ld.%09ld] %d\n", ts.tv_sec, ts.tv_nsec, atoi(buf)); in main()
|
/tools/testing/selftests/vm/ |
D | transhuge-stress.c | 137 s = b.tv_sec - a.tv_sec + (b.tv_nsec - a.tv_nsec) / 1000000000.; in main()
|
/tools/testing/selftests/futex/functional/ |
D | futex_requeue_pi.c | 294 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()
|
D | futex_wait_wouldblock.c | 41 struct timespec to = {.tv_sec = 0, .tv_nsec = timeout_ns}; in main()
|