xref: /kernel/linux/linux-6.6/include/linux/hrtimer_defs.h (revision 62306a36)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/include/linux/
162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _LINUX_HRTIMER_DEFS_H
362306a36Sopenharmony_ci#define _LINUX_HRTIMER_DEFS_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <linux/ktime.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#ifdef CONFIG_HIGH_RES_TIMERS
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci/*
1062306a36Sopenharmony_ci * The resolution of the clocks. The resolution value is returned in
1162306a36Sopenharmony_ci * the clock_getres() system call to give application programmers an
1262306a36Sopenharmony_ci * idea of the (in)accuracy of timers. Timer values are rounded up to
1362306a36Sopenharmony_ci * this resolution values.
1462306a36Sopenharmony_ci */
1562306a36Sopenharmony_ci# define HIGH_RES_NSEC		1
1662306a36Sopenharmony_ci# define KTIME_HIGH_RES		(HIGH_RES_NSEC)
1762306a36Sopenharmony_ci# define MONOTONIC_RES_NSEC	HIGH_RES_NSEC
1862306a36Sopenharmony_ci# define KTIME_MONOTONIC_RES	KTIME_HIGH_RES
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci#else
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci# define MONOTONIC_RES_NSEC	LOW_RES_NSEC
2362306a36Sopenharmony_ci# define KTIME_MONOTONIC_RES	KTIME_LOW_RES
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci#endif
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci#endif
28

Indexes created Thu Nov 07 10:32:03 CST 2024