aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ktime.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2006-01-12 05:36:14 -0500
committerThomas Gleixner <tglx@linutronix.de>2006-01-12 05:36:14 -0500
commite2787630c1abb075c935cf47e91beb7c656f48c4 (patch)
tree43b6ee44b9f81fdb33283313f167d6ecec2b0243 /include/linux/ktime.h
parent288867ec5c377db82933b64460ce050e5c998ee9 (diff)
[hrtimer] Change resolution storage to ktime_t format
Change the storage format of the per base resolution to ktime_t to make it easier accessible in the hrtimers code. Change the resolution from (NSEC_PER_SEC/HZ) to TICK_NSEC as Roman pointed out. TICK_NSEC is closer to the real resolution. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/ktime.h')
-rw-r--r--include/linux/ktime.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 222a047cc14..1bd6552cc34 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -272,8 +272,8 @@ static inline u64 ktime_to_ns(const ktime_t kt)
272 * idea of the (in)accuracy of timers. Timer values are rounded up to 272 * idea of the (in)accuracy of timers. Timer values are rounded up to
273 * this resolution values. 273 * this resolution values.
274 */ 274 */
275#define KTIME_REALTIME_RES (NSEC_PER_SEC/HZ) 275#define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC }
276#define KTIME_MONOTONIC_RES (NSEC_PER_SEC/HZ) 276#define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC }
277 277
278/* Get the monotonic time in timespec format: */ 278/* Get the monotonic time in timespec format: */
279extern void ktime_get_ts(struct timespec *ts); 279extern void ktime_get_ts(struct timespec *ts);