hrtimer_defs.h 660 B

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