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