aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ktime.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-01-09 23:52:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-10 11:01:37 -0500
commitc0a3132963db68f1fbbd0e316b73de100fee3f08 (patch)
treecdd76aacf0ca7ae7780696a06bf9643f8b245ba1 /include/linux/ktime.h
parent97fc79f97b1111c80010d34ee66312b88f531e41 (diff)
[PATCH] hrtimer: hrtimer core code
hrtimer subsystem core. It is initialized at bootup and expired by the timer interrupt, but is otherwise not utilized by any other subsystem yet. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/ktime.h')
-rw-r--r--include/linux/ktime.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 5b9a9eb82ba..222a047cc14 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -266,4 +266,19 @@ static inline u64 ktime_to_ns(const ktime_t kt)
266 266
267#endif 267#endif
268 268
269/*
270 * The resolution of the clocks. The resolution value is returned in
271 * the clock_getres() system call to give application programmers an
272 * idea of the (in)accuracy of timers. Timer values are rounded up to
273 * this resolution values.
274 */
275#define KTIME_REALTIME_RES (NSEC_PER_SEC/HZ)
276#define KTIME_MONOTONIC_RES (NSEC_PER_SEC/HZ)
277
278/* Get the monotonic time in timespec format: */
279extern void ktime_get_ts(struct timespec *ts);
280
281/* Get the real (wall-) time in timespec format: */
282#define ktime_get_real_ts(ts) getnstimeofday(ts)
283
269#endif 284#endif