18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef _LINUX_HRTIMER_DEFS_H
38c2ecf20Sopenharmony_ci#define _LINUX_HRTIMER_DEFS_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/ktime.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifdef CONFIG_HIGH_RES_TIMERS
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci/*
108c2ecf20Sopenharmony_ci * The resolution of the clocks. The resolution value is returned in
118c2ecf20Sopenharmony_ci * the clock_getres() system call to give application programmers an
128c2ecf20Sopenharmony_ci * idea of the (in)accuracy of timers. Timer values are rounded up to
138c2ecf20Sopenharmony_ci * this resolution values.
148c2ecf20Sopenharmony_ci */
158c2ecf20Sopenharmony_ci# define HIGH_RES_NSEC		1
168c2ecf20Sopenharmony_ci# define KTIME_HIGH_RES		(HIGH_RES_NSEC)
178c2ecf20Sopenharmony_ci# define MONOTONIC_RES_NSEC	HIGH_RES_NSEC
188c2ecf20Sopenharmony_ci# define KTIME_MONOTONIC_RES	KTIME_HIGH_RES
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#else
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci# define MONOTONIC_RES_NSEC	LOW_RES_NSEC
238c2ecf20Sopenharmony_ci# define KTIME_MONOTONIC_RES	KTIME_LOW_RES
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#endif
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci#endif
28