Home
last modified time | relevance | path

Searched refs:now (Results 1 – 25 of 107) sorted by relevance

12345

/tools/testing/selftests/timens/
A Dvfork_exec.c24 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()
48 .now = now, in check_in_thread()
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()
79 struct timespec now; in main() local
100 clock_gettime(CLOCK_MONOTONIC, &now); in main()
108 if (check("parent before vfork", &now)) in main()
[all …]
A Dexec.c23 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()
45 clock_gettime(CLOCK_MONOTONIC, &now); in main()
55 if (labs(tst.tv_sec - now.tv_sec) > 5) in main()
57 now.tv_sec, tst.tv_sec); in main()
75 if (labs(tst.tv_sec - now.tv_sec - OFFSET) > 5) in main()
77 now.tv_sec + OFFSET, tst.tv_sec); in main()
81 snprintf(now_str, sizeof(now_str), "%ld", now.tv_sec + OFFSET); in main()
A Dclock_nanosleep.c26 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()
A Dtimerfd.c18 static int tclock_gettime(clockid_t clockid, struct timespec *now) in tclock_gettime() argument
22 return clock_gettime(clockid, now); in tclock_gettime()
25 static 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()
A Dtimer.c18 static 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/testing/selftests/net/netfilter/
A Dconntrack_resize.sh91 local now=$(date +%s)
96 now=$(date +%s)
117 local now=$(date +%s)
125 now=$(date +%s)
134 local now=$(date +%s)
152 now=$(date +%s)
162 local now=$(date +%s)
176 now=$(date +%s)
192 now=$(date +%s)
223 now=$(date +%s)
[all …]
A Dconntrack_reverse_clash.sh31 local now
33 now=$(date +%s)
34 end=$((now + 5))
36 while [ $now -lt $end ];do
38 now=$(date +%s)
A Dconntrack_reverse_clash.c65 time_t end, now; in main() local
86 now = time(NULL); in main()
87 end = now + TEST_TIME; in main()
89 while (now < end) { in main()
93 now = time(NULL); in main()
/tools/power/cpupower/bench/
A Dbenchmark.c35 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()
135 (long)(then - now), sleep_time, in start_benchmark()
152 now = get_time(); in start_benchmark()
156 powersave_time += then - now - sleep_time; in start_benchmark()
[all …]
A Dsystem.c29 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/
A Dnanosleep.c91 struct timespec now, target, rel; in nanosleep_test() local
94 if (clock_gettime(clockid, &now)) in nanosleep_test()
96 target = timespec_add(now, ns); in nanosleep_test()
100 clock_gettime(clockid, &now); in nanosleep_test()
102 if (!in_order(target, now)) in nanosleep_test()
106 clock_gettime(clockid, &now); in nanosleep_test()
110 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()
A Dset-2038.c49 struct timeval now; in settime() local
52 now.tv_sec = (time_t)time; in settime()
53 now.tv_usec = 0; in settime()
55 ret = settimeofday(&now, NULL); in settime()
A Dmqueue-lat.c63 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()
A Dleap-a-day.c162 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()
A Dinconsistency-check.c87 long now, then; in consistency_test() local
92 now = then = list[0].tv_sec; in consistency_test()
98 while (seconds == -1 || now - then < seconds) { in consistency_test()
134 now = list[0].tv_sec; in consistency_test()
/tools/testing/selftests/bpf/prog_tests/
A Dtime_tai.c37 __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()
A Dlwt_reroute.c119 struct timespec now; in overflow_fq() local
126 err = clock_gettime(CLOCK_MONOTONIC, &now); in overflow_fq()
132 *(uint64_t *)CMSG_DATA(cmsg) = (now.tv_nsec + 1) * NSEC_PER_SEC + in overflow_fq()
133 now.tv_nsec; in overflow_fq()
/tools/testing/selftests/powerpc/tm/
A Dtm-syscall.c79 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/
A Dcpufreq-test_tsc.c56 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/
A Dmitigation-patching.sh12 local now
17 now=$start
19 while [[ $((now-start)) -lt "$TIMEOUT" ]]
24 now=$(date +%s)
/tools/testing/selftests/net/
A Dtimestamping.c138 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()
520 (long)now.tv_sec, (long)now.tv_usec, in main()
523 gettimeofday(&now, 0); in main()
[all …]
/tools/testing/selftests/bpf/progs/
A Dtest_tc_edt.c33 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/
A Dfunc_latency.bpf.c132 __u64 key, now; in BPF_PROG() local
138 now = bpf_ktime_get_ns(); in BPF_PROG()
141 bpf_map_update_elem(&functime, &key, &now, BPF_ANY); in BPF_PROG()
168 __u64 key, now; in BPF_PROG() local
174 now = bpf_ktime_get_ns(); in BPF_PROG()
177 bpf_map_update_elem(&functime, &key, &now, BPF_ANY); in BPF_PROG()
/tools/power/x86/intel_pstate_tracer/
A Dintel_pstate_tracer.py131 …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()))
267 g_plot('set title "{} : cpu io boost : {:%F %H:%M}"'.format(testname, datetime.now()))
[all …]
/tools/workqueue/
A Dwq_monitor.py79 def dict(self, now): argument
80 return { 'timestamp' : now,
148 now = time.time()
161 print(stats.dict(now))

Completed in 38 milliseconds

12345