blob: 2d3e3c5fb94662cd497171e758b05364475d2ca8 [file] [log] [blame]
Vincenzo Frascino32e29392019-06-22 15:02:07 +02001/* 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