Home
last modified time | relevance | path

Searched refs:timespec (Results 1 – 25 of 173) sorted by relevance

1234567

/linux-6.15/tools/testing/selftests/kvm/lib/
H A Dtest_util.c79 int64_t timespec_to_ns(struct timespec ts) in timespec_to_ns()
84 struct timespec timespec_add_ns(struct timespec ts, int64_t ns) in timespec_add_ns()
86 struct timespec res; in timespec_add_ns()
95 struct timespec timespec_add(struct timespec ts1, struct timespec ts2) in timespec_add()
99 return timespec_add_ns((struct timespec){0}, ns1 + ns2); in timespec_add()
102 struct timespec timespec_sub(struct timespec ts1, struct timespec ts2) in timespec_sub()
106 return timespec_add_ns((struct timespec){0}, ns1 - ns2); in timespec_sub()
109 struct timespec timespec_elapsed(struct timespec start) in timespec_elapsed()
111 struct timespec end; in timespec_elapsed()
117 struct timespec timespec_div(struct timespec ts, int divisor) in timespec_div()
[all …]
/linux-6.15/tools/testing/selftests/kvm/include/
H A Dtest_util.h83 int64_t timespec_to_ns(struct timespec ts);
84 struct timespec timespec_add_ns(struct timespec ts, int64_t ns);
85 struct timespec timespec_add(struct timespec ts1, struct timespec ts2);
86 struct timespec timespec_sub(struct timespec ts1, struct timespec ts2);
87 struct timespec timespec_elapsed(struct timespec start);
88 struct timespec timespec_div(struct timespec ts, int divisor);
/linux-6.15/tools/testing/selftests/timers/
H A Draw_skew.c44 unsigned long long ts_to_nsec(struct timespec ts) in ts_to_nsec()
49 struct timespec nsec_to_ts(long long ns) in nsec_to_ts()
51 struct timespec ts; in nsec_to_ts()
58 long long diff_timespec(struct timespec start, struct timespec end) in diff_timespec()
67 void get_monotonic_and_raw(struct timespec *mon, struct timespec *raw) in get_monotonic_and_raw()
69 struct timespec start, mid, end; in get_monotonic_and_raw()
92 struct timespec mon, raw, start, end; in main()
H A Dadjtick.c40 unsigned long long ts_to_nsec(struct timespec ts) in ts_to_nsec()
45 struct timespec nsec_to_ts(long long ns) in nsec_to_ts()
47 struct timespec ts; in nsec_to_ts()
55 long long diff_timespec(struct timespec start, struct timespec end) in diff_timespec()
65 void get_monotonic_and_raw(struct timespec *mon, struct timespec *raw) in get_monotonic_and_raw()
67 struct timespec start, mid, end; in get_monotonic_and_raw()
94 struct timespec mon_start, raw_start, mon_end, raw_end; in get_ppm_drift()
166 struct timespec raw; in main()
H A Dmqueue-lat.c40 long long timespec_sub(struct timespec a, struct timespec b) in timespec_sub()
48 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
63 struct timespec start, end, now, target; in mqueue_lat_test()
H A Dnanosleep.c68 static inline int in_order(struct timespec a, struct timespec b) in in_order()
79 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
91 struct timespec now, target, rel; in nanosleep_test()
H A Dnsleep-lat.c66 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
77 long long timespec_sub(struct timespec a, struct timespec b) in timespec_sub()
87 struct timespec start, end, target; in nanosleep_lat_test()
H A Dleap-a-day.c60 static inline int in_order(struct timespec a, struct timespec b) in in_order()
71 struct timespec timespec_add(struct timespec ts, unsigned long long ns) in timespec_add()
162 struct timespec now, target; in test_hrtimer_failure()
213 struct timespec ts; in main()
238 struct timespec ts; in main()
331 struct timespec tai; in main()
H A Dalarmtimer-suspend.c40 struct timespec start_time;
73 long long timespec_sub(struct timespec a, struct timespec b) in timespec_sub()
86 struct timespec ts; in sigalarm()
H A Dinconsistency-check.c69 static inline int in_order(struct timespec a, struct timespec b) in in_order()
85 struct timespec list[CALLS_PER_LOOP]; in consistency_test()
146 struct timespec ts; in main()
H A Dthreadtest.c37 struct timespec global_list[LISTSIZE];
41 void checklist(const struct timespec *list, int size) in checklist()
44 const struct timespec *a, *b; in checklist()
105 struct timespec my_list[LISTSIZE]; in independent_thread()
/linux-6.15/tools/testing/selftests/kvm/
H A Ddirty_log_perf_test.c74 struct timespec start; in vcpu_worker()
75 struct timespec ts_diff; in vcpu_worker()
76 struct timespec total = (struct timespec){0}; in vcpu_worker()
77 struct timespec avg; in vcpu_worker()
144 struct timespec start; in run_test()
145 struct timespec ts_diff; in run_test()
146 struct timespec get_dirty_log_total = (struct timespec){0}; in run_test()
147 struct timespec vcpu_dirty_total = (struct timespec){0}; in run_test()
148 struct timespec avg; in run_test()
149 struct timespec clear_dirty_log_total = (struct timespec){0}; in run_test()
H A Ddemand_paging_test.c37 struct timespec start; in vcpu_worker()
38 struct timespec ts_diff; in vcpu_worker()
62 struct timespec start; in handle_uffd_page_request()
63 struct timespec ts_diff; in handle_uffd_page_request()
158 struct timespec start; in run_test()
159 struct timespec ts_diff; in run_test()
/linux-6.15/tools/testing/selftests/timens/
H A Dvfork_exec.c24 struct timespec *now;
30 struct timespec *now = args->now, tst; in tcheck()
44 static int check_in_thread(char *tst_name, struct timespec *now) in check_in_thread()
60 static int check(char *tst_name, struct timespec *now) in check()
62 struct timespec tst; in check()
79 struct timespec now; in main()
/linux-6.15/include/uapi/linux/
H A Dtime.h11 struct timespec { struct
23 struct timespec it_interval;/* timer period */ argument
24 struct timespec it_value; /* timer expiration */
/linux-6.15/tools/perf/bench/
H A Dfutex.h49 futex_syscall(volatile u_int32_t *uaddr, int op, u_int32_t val, struct timespec *timeout, in futex_syscall()
67 futex_wait(u_int32_t *uaddr, u_int32_t val, struct timespec *timeout, int opflags) in futex_wait()
86 futex_lock_pi(u_int32_t *uaddr, struct timespec *timeout, int opflags) in futex_lock_pi()
123 struct timespec *timeout, int opflags) in futex_wait_requeue_pi()
/linux-6.15/tools/perf/util/
H A Diostat.h21 struct timespec;
39 char *prefix, struct timespec *ts);
44 struct perf_stat_config *config, struct timespec *ts,
/linux-6.15/tools/testing/selftests/cgroup/
H A Dtest_cpu.c31 struct timespec ts;
106 static struct timespec
107 timespec_sub(const struct timespec *lhs, const struct timespec *rhs) in timespec_sub()
109 struct timespec zero = { in timespec_sub()
113 struct timespec ret; in timespec_sub()
136 struct timespec ts_run = param->ts; in hog_cpus_timed()
137 struct timespec ts_remaining = ts_run; in hog_cpus_timed()
138 struct timespec ts_start; in hog_cpus_timed()
154 struct timespec ts_total; in hog_cpus_timed()
165 struct timespec ts_current; in hog_cpus_timed()
/linux-6.15/Documentation/translations/zh_CN/userspace-api/
H A Dfutex2.rst31 unsigned int flags, struct timespec *timeout, clockid_t clockid)
66 ``struct timespec *timeout`` 是一个指向绝对超时时间的可选参数。你需要在 ``clockid``
68 系统调用只接受64位的timespec结构体。
/linux-6.15/tools/testing/selftests/bpf/prog_tests/
H A Dnet_timestamping.c15 static struct timespec usr_ts;
21 static int64_t timespec_to_ns64(struct timespec *ts) in timespec_to_ns64()
38 static void validate_timestamp(struct timespec *cur, struct timespec *prev) in validate_timestamp()
51 static struct timespec prev_ts; in test_socket_timestamp()
/linux-6.15/Documentation/core-api/
H A Dtimekeeping.rst84 interface that expects a 'timespec' or 'timeval' structure.
150 all interfaces returning a 'struct timeval' or 'struct timespec' have
154 .. c:function:: void ktime_get_ts( struct timespec * )
159 void getnstimeofday( struct timespec * )
161 void ktime_get_real_ts( struct timespec * )
167 .. c:function:: struct timespec current_kernel_time( void )
169 struct timespec get_monotonic_coarse( void )
178 .. c:function:: struct timespec getrawmonotonic( void )
180 struct timespec timekeeping_clocktai( void )
182 struct timespec get_monotonic_boottime( void )
/linux-6.15/tools/testing/selftests/futex/include/
H A Dfutextest.h78 futex_wait(futex_t *uaddr, futex_t val, struct timespec *timeout, int opflags) in futex_wait()
98 futex_wait_bitset(futex_t *uaddr, futex_t val, struct timespec *timeout, in futex_wait_bitset()
121 futex_lock_pi(futex_t *uaddr, struct timespec *timeout, int detect, in futex_lock_pi()
186 struct timespec *timeout, int opflags) in futex_wait_requeue_pi()
/linux-6.15/tools/testing/radix-tree/
H A Dbenchmark.c18 struct timespec start, finish; in benchmark_iter()
55 struct timespec start, finish; in benchmark_insert()
76 struct timespec start, finish; in benchmark_tagging()
97 struct timespec start, finish; in benchmark_delete()
/linux-6.15/tools/testing/selftests/vDSO/
H A Dvdso_test_abi.c30 typedef long (*vdso_clock_gettime_t)(clockid_t clk_id, struct timespec *ts);
31 typedef long (*vdso_clock_getres_t)(clockid_t clk_id, struct timespec *ts);
86 struct timespec ts; in vdso_test_clock_gettime()
138 struct timespec ts, sys_ts; in vdso_test_clock_getres()
/linux-6.15/arch/um/os-Linux/
H A Dtime.c21 static inline long long timespec_to_ns(const struct timespec *ts) in timespec_to_ns()
28 struct timespec realtime_tp; in os_persistent_clock_emulation()
90 struct timespec ts; in os_nsecs()

1234567