summaryrefslogtreecommitdiff
path: root/include/linux/timekeeping.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-03-17 12:39:10 +0100
committerIngo Molnar <mingo@kernel.org>2015-03-27 09:45:10 +0100
commitfe5fba05b46c791c95a9f34228ac495f81f72fc0 (patch)
tree8f96b57c0aae9034491b5e2896340dfec7d03635 /include/linux/timekeeping.h
parentf09cb9a1808e35ad7502ea39b6bfb443c7fa0f19 (diff)
time: Add ktime_get_tai_ns()
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>
Diffstat (limited to 'include/linux/timekeeping.h')
-rw-r--r--include/linux/timekeeping.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index f36b1edf3f73..5047b83483d6 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -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());