summaryrefslogtreecommitdiff
path: root/include/linux/timekeeping.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-07-17 01:04:14 +0400
committerJohn Stultz <john.stultz@linaro.org>2014-07-23 21:17:59 +0400
commitf5264d5d5a0729306cc792d84432b97785d2662a (patch)
treec9a1325c8353fa5571be1bdef49fa8e372b7d648 /include/linux/timekeeping.h
parent0077dc60f274b9a7e9aa705a34784fefb87e0eee (diff)
downloadlinux-f5264d5d5a0729306cc792d84432b97785d2662a.tar.xz
timekeeping: Use ktime_t based data for ktime_get_real()
Speed up the readout. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'include/linux/timekeeping.h')
-rw-r--r--include/linux/timekeeping.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index a58e4b1879db..68e6678a743b 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -108,11 +108,18 @@ enum tk_offsets {
extern ktime_t ktime_get(void);
extern ktime_t ktime_get_with_offset(enum tk_offsets offs);
-extern ktime_t ktime_get_real(void);
extern ktime_t ktime_get_boottime(void);
extern ktime_t ktime_get_monotonic_offset(void);
extern ktime_t ktime_get_clocktai(void);
+/**
+ * ktime_get_real - get the real (wall-) time in ktime_t format
+ */
+static inline ktime_t ktime_get_real(void)
+{
+ return ktime_get_with_offset(TK_OFFS_REAL);
+}
+
/*
* RTC specific
*/