xref: /openbmc/linux/include/linux/hrtimer_defs.h (revision 32e29396)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_HRTIMER_DEFS_H
3 #define _LINUX_HRTIMER_DEFS_H
4 
5 #include <linux/ktime.h>
6 
7 #ifdef CONFIG_HIGH_RES_TIMERS
8 
9 /*
10  * The resolution of the clocks. The resolution value is returned in
11  * the clock_getres() system call to give application programmers an
12  * idea of the (in)accuracy of timers. Timer values are rounded up to
13  * this resolution values.
14  */
15 # define HIGH_RES_NSEC		1
16 # define KTIME_HIGH_RES		(HIGH_RES_NSEC)
17 # define MONOTONIC_RES_NSEC	HIGH_RES_NSEC
18 # define KTIME_MONOTONIC_RES	KTIME_HIGH_RES
19 
20 #else
21 
22 # define MONOTONIC_RES_NSEC	LOW_RES_NSEC
23 # define KTIME_MONOTONIC_RES	KTIME_LOW_RES
24 
25 #endif
26 
27 #endif
28