/tools/testing/selftests/timens/ |
D | exec.c | 28 if (sscanf(argv[1], "%ld", &now.tv_sec) != 1) in main() 33 if (abs(tst.tv_sec - now.tv_sec) > 5) in main() 34 return pr_fail("%ld %ld\n", now.tv_sec, tst.tv_sec); in main() 53 if (abs(tst.tv_sec - now.tv_sec) > 5) in main() 55 now.tv_sec, tst.tv_sec); in main() 73 if (abs(tst.tv_sec - now.tv_sec - OFFSET) > 5) in main() 75 now.tv_sec + OFFSET, tst.tv_sec); in main() 79 snprintf(now_str, sizeof(now_str), "%ld", now.tv_sec + OFFSET); in main()
|
D | timens.c | 113 child_ts_new.tv_sec = parent_ts_old.tv_sec + offset; in test_gettime() 121 if (difftime(cur_ts.tv_sec, child_ts_new.tv_sec) < precision) { in test_gettime() 124 clocks[clock_index].name, entry, parent_ts_old.tv_sec, in test_gettime() 125 child_ts_new.tv_sec, cur_ts.tv_sec); in test_gettime() 135 if (difftime(cur_ts.tv_sec, parent_ts_old.tv_sec) > DAY_IN_SEC) { in test_gettime() 138 clocks[clock_index].name, entry, parent_ts_old.tv_sec, in test_gettime() 139 child_ts_new.tv_sec, cur_ts.tv_sec); in test_gettime()
|
D | timer.c | 32 new_value.it_value.tv_sec = 3600; in run_test() 34 new_value.it_interval.tv_sec = 1; in run_test() 38 new_value.it_value.tv_sec += now.tv_sec; in run_test() 58 elapsed = new_value.it_value.tv_sec; in run_test() 101 mtime_now.tv_sec += 70 * 24 * 3600; in main() 102 btime_now.tv_sec += 9 * 24 * 3600; in main()
|
D | timerfd.c | 40 new_value.it_value.tv_sec = 3600; in run_test() 42 new_value.it_interval.tv_sec = 1; in run_test() 46 new_value.it_value.tv_sec += now.tv_sec; in run_test() 63 elapsed = new_value.it_value.tv_sec; in run_test() 108 mtime_now.tv_sec += 70 * 24 * 3600; in main() 109 btime_now.tv_sec += 9 * 24 * 3600; in main()
|
D | procfs.c | 91 uptime->tv_sec = up_sec; in read_proc_uptime() 114 uptime_expected = uptime_old.tv_sec + TEN_DAYS_IN_SEC; in check_uptime() 115 if (fabs(difftime(uptime_new.tv_sec, uptime_expected)) > prec) { in check_uptime() 117 uptime_old.tv_sec, uptime_new.tv_sec, in check_uptime() 118 uptime_old.tv_sec + TEN_DAYS_IN_SEC); in check_uptime()
|
D | futex.c | 32 timeout.tv_sec++; in run_test() 50 if (end.tv_sec < timeout.tv_sec || in run_test() 51 (end.tv_sec == timeout.tv_sec && end.tv_nsec < timeout.tv_nsec)) { in run_test()
|
D | clock_nanosleep.c | 64 now.tv_sec = start.tv_sec; in run_test() 68 now.tv_sec += 3600; in run_test() 104 if (rem.tv_sec < 3300 || rem.tv_sec > 3900) { in run_test() 106 clockid, abs, rem.tv_sec); in run_test()
|
D | gettime_perf.c | 47 for (tp = start; start.tv_sec + timeout > tp.tv_sec || in test() 48 (start.tv_sec + timeout == tp.tv_sec && in test()
|
/tools/testing/selftests/timers/ |
D | leap-a-day.c | 62 if (a.tv_sec < b.tv_sec) in in_order() 64 if (a.tv_sec > b.tv_sec) in in_order() 76 ts.tv_sec++; in timespec_add() 138 if (tx.time.tv_sec < next_leap) { in sigalarm() 142 tx.time.tv_sec, in sigalarm() 151 tx.time.tv_sec, in sigalarm() 246 next_leap = ts.tv_sec; in main() 252 tv.tv_sec = next_leap - 10; in main() 255 printf("Setting time to %s", ctime(&tv.tv_sec)); in main() 300 its1.it_value.tv_sec = next_leap; in main() [all …]
|
D | inconsistency-check.c | 83 if ((unsigned long)a.tv_sec < (unsigned long)b.tv_sec) in in_order() 85 if ((unsigned long)a.tv_sec > (unsigned long)b.tv_sec) in in_order() 103 now = then = list[0].tv_sec; in consistency_test() 129 printf("%lu:%lu\n", list[i].tv_sec, in consistency_test() 134 delta = list[inconsistent].tv_sec * NSEC_PER_SEC; in consistency_test() 136 delta -= list[inconsistent+1].tv_sec * NSEC_PER_SEC; in consistency_test() 146 now = list[0].tv_sec; in consistency_test()
|
D | nanosleep.c | 82 if (a.tv_sec < b.tv_sec) in in_order() 84 if (a.tv_sec > b.tv_sec) in in_order() 96 ts.tv_sec++; in timespec_add() 119 rel.tv_sec = 0; in nanosleep_test()
|
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() 108 printf("ALARM(%i): %ld:%ld latency: %lld ns ", alarmcount, ts.tv_sec, in sigalarm() 152 start_time.tv_sec, start_time.tv_nsec); in main() 155 its1.it_value.tv_sec += SUSPEND_SECS; in main() 156 its1.it_interval.tv_sec = SUSPEND_SECS; in main()
|
D | freq-step.c | 45 return ts1->tv_sec - ts2->tv_sec + (ts1->tv_nsec - ts2->tv_nsec) / 1e9; in diff_timespec() 59 ts1.tv_sec -= mono_raw_base; in get_sample() 60 ts2.tv_sec -= mono_base; in get_sample() 61 ts3.tv_sec -= mono_raw_base; in get_sample() 72 sample->time = ts1.tv_sec + ts1.tv_nsec / 1e9; in get_sample() 85 txc.time.tv_sec = 0; in reset_ntp_error() 213 mono_raw_base = ts.tv_sec; in init_test() 220 mono_base = ts.tv_sec; in init_test() 233 srand(ts.tv_sec ^ ts.tv_nsec); in init_test()
|
D | valid-adjtimex.c | 205 tmx.time.tv_sec = offset / NSEC_PER_SEC; in set_offset() 209 tmx.time.tv_sec -= 1; in set_offset() 213 tmx.time.tv_sec = offset / USEC_PER_SEC; in set_offset() 217 tmx.time.tv_sec -= 1; in set_offset() 224 printf("(sec: %ld usec: %ld) ", tmx.time.tv_sec, tmx.time.tv_usec); in set_offset() 240 tmx.time.tv_sec = sec; in set_bad_offset() 244 printf("Invalid (sec: %ld usec: %ld) did not fail! ", tmx.time.tv_sec, tmx.time.tv_usec); in set_bad_offset()
|
D | leapcrash.c | 78 next_leap = ts.tv_sec; in main() 86 tv.tv_sec = next_leap - 2; in main() 96 while (tx.time.tv_sec < next_leap + 1) { in main()
|
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() 156 its1.it_value.tv_sec += TIMER_SECS; in setup_timer() 158 its1.it_value.tv_sec = TIMER_SECS; in setup_timer() 161 its1.it_interval.tv_sec = interval; in setup_timer() 241 timeout.tv_sec = 5; in do_timer_oneshot()
|
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() 53 ts.tv_sec++; in timespec_add()
|
/tools/testing/selftests/x86/ |
D | test_vdso.c | 188 if (a->tv_sec != b->tv_sec) in ts_leq() 189 return a->tv_sec < b->tv_sec; in ts_leq() 196 if (a->tv_sec != b->tv_sec) in tv_leq() 197 return a->tv_sec < b->tv_sec; in tv_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() 306 (unsigned long long)start.tv_sec, start.tv_usec, in test_gettimeofday() 307 (unsigned long long)vdso.tv_sec, vdso.tv_usec, in test_gettimeofday() 308 (unsigned long long)end.tv_sec, end.tv_usec); in test_gettimeofday()
|
/tools/testing/radix-tree/ |
D | benchmark.c | 38 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_iter() 66 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_insert() 87 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_tagging() 108 nsec = (finish.tv_sec - start.tv_sec) * NSEC_PER_SEC + in benchmark_delete()
|
/tools/testing/selftests/kvm/ |
D | dirty_log_perf_test.c | 71 vcpu_id, current_iteration, ts_diff.tv_sec, in vcpu_worker() 75 vcpu_id, current_iteration, ts_diff.tv_sec, in vcpu_worker() 86 total.tv_sec, total.tv_nsec, avg.tv_sec, avg.tv_nsec); in vcpu_worker() 154 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 162 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 182 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 191 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 202 iteration, ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 216 ts_diff.tv_sec, ts_diff.tv_nsec); in run_test() 220 iterations, get_dirty_log_total.tv_sec, in run_test() [all …]
|
/tools/testing/selftests/rcutorture/bin/ |
D | mkinitrd.sh | 53 tv.tv_sec -= tvb.tv_sec; 54 if (tv.tv_sec > 1) 56 tv.tv_usec += tv.tv_sec * 1000 * 1000;
|
/tools/testing/selftests/net/ |
D | timestamping.c | 130 (long)now.tv_sec, (long)now.tv_usec, in sendpacket() 148 (long)now.tv_sec, (long)now.tv_usec, in printpacket() 165 (long)stamp->tv_sec, in printpacket() 173 (long)stamp->tv_sec, in printpacket() 182 (long)stamp->tv_sec, in printpacket() 188 (long)stamp->tv_sec, in printpacket() 246 (long)tv.tv_sec, in printpacket() 254 (long)ts.tv_sec, in printpacket() 462 next.tv_sec = (next.tv_sec + 1) / 5 * 5; in main() 472 delta_us = (long)(next.tv_sec - now.tv_sec) * 1000000 + in main() [all …]
|
/tools/testing/selftests/mqueue/ |
D | mq_perf_tests.c | 358 nsec = ((middle.tv_sec - start.tv_sec) * 1000000000) + \ 362 send_total.tv_sec++; \ 365 nsec = ((end.tv_sec - middle.tv_sec) * 1000000000) + \ 369 recv_total.tv_sec++; \ 457 send_total.tv_sec = 0; in perf_test_thread() 459 recv_total.tv_sec = 0; in perf_test_thread() 464 send_total.tv_sec, send_total.tv_nsec); in perf_test_thread() 465 nsec = ((unsigned long long)send_total.tv_sec * 1000000000 + in perf_test_thread() 469 recv_total.tv_sec, recv_total.tv_nsec); in perf_test_thread() 470 nsec = ((unsigned long long)recv_total.tv_sec * 1000000000 + in perf_test_thread() [all …]
|
/tools/perf/bench/ |
D | syscall.c | 53 result_usec = diff.tv_sec * 1000000; in bench_syscall_basic() 57 diff.tv_sec, in bench_syscall_basic() 69 diff.tv_sec, in bench_syscall_basic()
|
/tools/testing/selftests/powerpc/benchmarks/ |
D | gettimeofday.c | 23 …printf("time = %.6f\n", tv_end.tv_sec - tv_start.tv_sec + (tv_end.tv_usec - tv_start.tv_usec) * 1e… in test_gettimeofday()
|