From 9342d33f92bad531b9d31d7066b3bf04bc198fe3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Tigeot?= Date: Sun, 14 Feb 2016 17:53:48 +0100 Subject: [PATCH] drm/linux: Add two ktime_xxx functions --- sys/dev/drm/include/linux/timekeeping.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/dev/drm/include/linux/timekeeping.h b/sys/dev/drm/include/linux/timekeeping.h index f7bc591310..14a3cad99d 100644 --- a/sys/dev/drm/include/linux/timekeeping.h +++ b/sys/dev/drm/include/linux/timekeeping.h @@ -36,4 +36,17 @@ static inline u64 ktime_get_raw_ns(void) return (ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec; } +static inline ktime_t ktime_mono_to_real(ktime_t mono) +{ + return mono; +} + +static inline ktime_t ktime_get_real(void) +{ + ktime_t kt; + + kt.tv64 = ktime_get_raw_ns(); + return kt; +} + #endif /* _LINUX_TIMEKEEPING_H_ */ -- 2.11.4.GIT