time: Add ktime_get_tai_ns()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 17 Mar 2015 11:39:10 +0000 (12:39 +0100)
committerIngo Molnar <mingo@kernel.org>
Fri, 27 Mar 2015 08:45:10 +0000 (09:45 +0100)
Because it was the only clock for which we didn't have a _ns()
accessor yet.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/timekeeping.h

index f36b1edf3f73361872bc8b3c7203ed914f112910..5047b83483d6675f5309dfbb04eb33c3d67ba9bc 100644 (file)
@@ -214,6 +214,11 @@ static inline u64 ktime_get_boot_ns(void)
        return ktime_to_ns(ktime_get_boottime());
 }
 
+static inline u64 ktime_get_tai_ns(void)
+{
+       return ktime_to_ns(ktime_get_clocktai());
+}
+
 static inline u64 ktime_get_raw_ns(void)
 {
        return ktime_to_ns(ktime_get_raw());