[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>
This commit is contained in:
@ -272,8 +272,8 @@ static inline u64 ktime_to_ns(const ktime_t kt)
|
||||
* idea of the (in)accuracy of timers. Timer values are rounded up to
|
||||
* this resolution values.
|
||||
*/
|
||||
#define KTIME_REALTIME_RES (NSEC_PER_SEC/HZ)
|
||||
#define KTIME_MONOTONIC_RES (NSEC_PER_SEC/HZ)
|
||||
#define KTIME_REALTIME_RES (ktime_t){ .tv64 = TICK_NSEC }
|
||||
#define KTIME_MONOTONIC_RES (ktime_t){ .tv64 = TICK_NSEC }
|
||||
|
||||
/* Get the monotonic time in timespec format: */
|
||||
extern void ktime_get_ts(struct timespec *ts);
|
||||
|
Reference in New Issue
Block a user