Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_HRTIMER_DEFS_H
0003 #define _LINUX_HRTIMER_DEFS_H
0004 
0005 #include <linux/ktime.h>
0006 
0007 #ifdef CONFIG_HIGH_RES_TIMERS
0008 
0009 /*
0010  * The resolution of the clocks. The resolution value is returned in
0011  * the clock_getres() system call to give application programmers an
0012  * idea of the (in)accuracy of timers. Timer values are rounded up to
0013  * this resolution values.
0014  */
0015 # define HIGH_RES_NSEC      1
0016 # define KTIME_HIGH_RES     (HIGH_RES_NSEC)
0017 # define MONOTONIC_RES_NSEC HIGH_RES_NSEC
0018 # define KTIME_MONOTONIC_RES    KTIME_HIGH_RES
0019 
0020 #else
0021 
0022 # define MONOTONIC_RES_NSEC LOW_RES_NSEC
0023 # define KTIME_MONOTONIC_RES    KTIME_LOW_RES
0024 
0025 #endif
0026 
0027 #endif