/tools/testing/selftests/timens/ |
D | vfork_exec.c | 24 struct timespec *now; member 30 struct timespec *now = args->now, tst; in tcheck() local 35 if (labs(tst.tv_sec - now->tv_sec) > 5) { in tcheck() 37 args->tst_name, tst.tv_sec, now->tv_sec); in tcheck() 44 static int check_in_thread(char *tst_name, struct timespec *now) in check_in_thread() argument 48 .now = now, in check_in_thread() 60 static int check(char *tst_name, struct timespec *now) in check() argument 67 if (labs(tst.tv_sec - now->tv_sec) > 5) in check() 69 tst_name, tst.tv_sec, now->tv_sec); in check() 71 if (check_in_thread(tst_name, now)) in check() [all …]
|
D | exec.c | 23 struct timespec now, tst; in main() local 28 if (sscanf(argv[1], "%ld", &now.tv_sec) != 1) in main() 33 if (labs(tst.tv_sec - now.tv_sec) > 5) in main() 34 return pr_fail("%ld %ld\n", now.tv_sec, tst.tv_sec); in main() 43 clock_gettime(CLOCK_MONOTONIC, &now); in main() 53 if (labs(tst.tv_sec - now.tv_sec) > 5) in main() 55 now.tv_sec, tst.tv_sec); in main() 73 if (labs(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 | clock_nanosleep.c | 26 struct timespec *now, *rem; member 36 clock_nanosleep(args->clockid, args->abs ? TIMER_ABSTIME : 0, args->now, args->rem); in call_nanosleep() 43 struct timespec now = {}, rem; in run_test() local 44 struct thread_args args = { .now = &now, .rem = &rem, .clockid = clockid}; in run_test() 64 now.tv_sec = start.tv_sec; in run_test() 65 now.tv_nsec = start.tv_nsec; in run_test() 68 now.tv_sec += 3600; in run_test()
|
D | timerfd.c | 18 static int tclock_gettime(clock_t clockid, struct timespec *now) in tclock_gettime() argument 22 return clock_gettime(clockid, now); in tclock_gettime() 25 int run_test(int clockid, struct timespec now) in run_test() argument 34 if (tclock_gettime(clockid, &now)) in run_test() 46 new_value.it_value.tv_sec += now.tv_sec; in run_test() 47 new_value.it_value.tv_nsec += now.tv_nsec; in run_test()
|
D | timer.c | 18 int run_test(int clockid, struct timespec now) in run_test() argument 38 new_value.it_value.tv_sec += now.tv_sec; in run_test() 39 new_value.it_value.tv_nsec += now.tv_nsec; in run_test()
|
/tools/power/cpupower/bench/ |
D | benchmark.c | 35 long long now, then; in calculate_timespace() local 44 now = get_time(); in calculate_timespace() 48 timed = (unsigned int)(then - now); in calculate_timespace() 55 now = get_time(); in calculate_timespace() 59 timed = (unsigned int)(then - now); in calculate_timespace() 81 long long now, then; in start_benchmark() local 126 now = get_time(); in start_benchmark() 130 performance_time += then - now - sleep_time; in start_benchmark() 135 (long)(then - now), sleep_time, in start_benchmark() 152 now = get_time(); in start_benchmark() [all …]
|
D | system.c | 29 struct timeval now; in get_time() local 31 gettimeofday(&now, NULL); in get_time() 33 return (long long int)(now.tv_sec * 1000000LL + now.tv_usec); in get_time()
|
/tools/testing/selftests/timers/ |
D | nanosleep.c | 103 struct timespec now, target, rel; in nanosleep_test() local 106 if (clock_gettime(clockid, &now)) in nanosleep_test() 108 target = timespec_add(now, ns); in nanosleep_test() 112 clock_gettime(clockid, &now); in nanosleep_test() 114 if (!in_order(target, now)) in nanosleep_test() 118 clock_gettime(clockid, &now); in nanosleep_test() 122 target = timespec_add(now, ns); in nanosleep_test() 124 clock_gettime(clockid, &now); in nanosleep_test() 126 if (!in_order(target, now)) in nanosleep_test()
|
D | set-2038.c | 50 struct timeval now; in settime() local 53 now.tv_sec = (time_t)time; in settime() 54 now.tv_usec = 0; in settime() 56 ret = settimeofday(&now, NULL); in settime()
|
D | mqueue-lat.c | 63 struct timespec start, end, now, target; in mqueue_lat_test() local 80 clock_gettime(CLOCK_REALTIME, &now); in mqueue_lat_test() 81 target = now; in mqueue_lat_test() 82 target = timespec_add(now, TARGET_TIMEOUT); /* 100ms */ in mqueue_lat_test()
|
D | leap-a-day.c | 162 struct timespec now, target; in test_hrtimer_failure() local 164 clock_gettime(CLOCK_REALTIME, &now); in test_hrtimer_failure() 165 target = timespec_add(now, NSEC_PER_SEC/2); in test_hrtimer_failure() 167 clock_gettime(CLOCK_REALTIME, &now); in test_hrtimer_failure() 169 if (!in_order(target, now)) { in test_hrtimer_failure() 240 time_t now; in main() local 328 now = tx.time.tv_sec; in main() 329 while (now < next_leap + 2) { in main() 353 now = tx.time.tv_sec; in main()
|
D | inconsistency-check.c | 98 long now, then; in consistency_test() local 103 now = then = list[0].tv_sec; in consistency_test() 109 while (seconds == -1 || now - then < seconds) { in consistency_test() 145 now = list[0].tv_sec; in consistency_test()
|
D | threadtest.c | 123 time_t start, now, runtime; in main() local 172 while (time(&now) < start + runtime) { in main() 176 strftime(buf, 255, "%a, %d %b %Y %T %z", localtime(&now)); in main()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | time_tai.c | 37 __u64 ts1, ts2, now; in test_time_tai() local 64 now = ts_to_ns(&now_tai); in test_time_tai() 66 ASSERT_TRUE(now > ts1, "tai_future_ts1"); in test_time_tai() 67 ASSERT_TRUE(now > ts2, "tai_future_ts2"); in test_time_tai() 70 ASSERT_TRUE(now - ts1 < TAI_THRESHOLD, "tai_range_ts1"); in test_time_tai() 71 ASSERT_TRUE(now - ts2 < TAI_THRESHOLD, "tai_range_ts2"); in test_time_tai()
|
D | lwt_reroute.c | 117 struct timespec now; in overflow_fq() local 124 err = clock_gettime(CLOCK_MONOTONIC, &now); in overflow_fq() 130 *(uint64_t *)CMSG_DATA(cmsg) = (now.tv_nsec + 1) * NSEC_PER_SEC + in overflow_fq() 131 now.tv_nsec; in overflow_fq()
|
/tools/testing/selftests/powerpc/tm/ |
D | tm-syscall.c | 79 struct timeval end, now; in tm_syscall() local 89 now.tv_sec = TEST_DURATION; in tm_syscall() 90 now.tv_usec = 0; in tm_syscall() 91 timeradd(&end, &now, &end); in tm_syscall() 93 for (count = 0; timercmp(&now, &end, <); count++) { in tm_syscall() 116 gettimeofday(&now, 0); in tm_syscall()
|
/tools/power/cpupower/debug/kernel/ |
D | cpufreq-test_tsc.c | 56 u32 now, then, diff; in cpufreq_test_tsc() local 88 now = read_pmtmr(); in cpufreq_test_tsc() 90 diff = (now - then) & 0xFFFFFF; in cpufreq_test_tsc() 92 …printk(KERN_DEBUG "t1: %08u t2: %08u diff_pmtmr: %08u diff_tsc: %016llu\n", then, now, diff, diff_… in cpufreq_test_tsc() 93 then = now; in cpufreq_test_tsc()
|
/tools/testing/selftests/powerpc/security/ |
D | mitigation-patching.sh | 12 local now 17 now=$start 19 while [[ $((now-start)) -lt "$TIMEOUT" ]] 24 now=$(date +%s)
|
/tools/testing/selftests/net/ |
D | timestamping.c | 138 struct timeval now; in sendpacket() local 142 gettimeofday(&now, 0); in sendpacket() 147 (long)now.tv_sec, (long)now.tv_usec, in sendpacket() 162 struct timeval now; in printpacket() local 164 gettimeofday(&now, 0); in printpacket() 167 (long)now.tv_sec, (long)now.tv_usec, in printpacket() 501 struct timeval now; in main() local 507 gettimeofday(&now, 0); in main() 508 delta_us = (long)(next.tv_sec - now.tv_sec) * 1000000 + in main() 509 (long)(next.tv_usec - now.tv_usec); in main() [all …]
|
/tools/testing/selftests/bpf/progs/ |
D | test_tc_edt.c | 33 uint64_t now = bpf_ktime_get_ns(); in throttle_flow() local 40 if (tstamp < now) in throttle_flow() 41 tstamp = now; in throttle_flow() 51 if (next_tstamp - now >= TIME_HORIZON_NS) in throttle_flow() 55 if (next_tstamp - now >= ECN_HORIZON_NS) in throttle_flow()
|
/tools/perf/util/bpf_skel/ |
D | func_latency.bpf.c | 47 __u64 key, now; in BPF_PROG() local 72 now = bpf_ktime_get_ns(); in BPF_PROG() 75 bpf_map_update_elem(&functime, &key, &now, BPF_ANY); in BPF_PROG()
|
/tools/power/x86/intel_pstate_tracer/ |
D | intel_pstate_tracer.py | 110 … cpu perf busy vs. sample : CPU {:0>3} : {:%F %H:%M}"'.format(testname, cpu_index, datetime.now())) 131 …set title "{} : perf busy : CPU {:0>3} : {:%F %H:%M}"'.format(testname, cpu_index, datetime.now())) 148 …set title "{} : durations : CPU {:0>3} : {:%F %H:%M}"'.format(testname, cpu_index, datetime.now())) 164 …ot('set title "{} : loads : CPU {:0>3} : {:%F %H:%M}"'.format(testname, cpu_index, datetime.now())) 181 … g_plot('set title "{} : cpu pstate vs. sample : {:%F %H:%M}"'.format(testname, datetime.now())) 194 g_plot('set title "{} : cpu pstates : {:%F %H:%M}"'.format(testname, datetime.now())) 211 g_plot('set title "{} : cpu loads : {:%F %H:%M}"'.format(testname, datetime.now())) 225 g_plot('set title "{} : cpu frequencies : {:%F %H:%M}"'.format(testname, datetime.now())) 239 g_plot('set title "{} : cpu durations : {:%F %H:%M}"'.format(testname, datetime.now())) 253 g_plot('set title "{} : cpu scaled busy : {:%F %H:%M}"'.format(testname, datetime.now())) [all …]
|
/tools/workqueue/ |
D | wq_monitor.py | 86 def dict(self, now): argument 87 return { 'timestamp' : now, 155 now = time.time() 168 print(stats.dict(now))
|
/tools/testing/selftests/powerpc/mm/ |
D | tlbie_test.c | 48 time_t now; in err_msg() local 49 time(&now); in err_msg() 52 printf(" %s", ctime(&now)); in err_msg() 616 time_t now; in main() local 680 time(&now); in main() 683 printf(" %s", ctime(&now)); in main() 724 time(&now); in main() 727 printf(" %s", ctime(&now)); in main()
|
/tools/cgroup/ |
D | iocost_monitor.py | 114 def dict(self, now): argument 116 'timestamp' : now, 175 def dict(self, now, path): argument 177 'timestamp' : now, 248 now = time.time() variable 256 output += json.dumps(iocstat.dict(now)) 273 output += '\n' + json.dumps(iocg_stat.dict(now, path))
|