summaryrefslogtreecommitdiff
path: root/include/linux/timekeeping.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-07-16 21:04:13 +0000
committerJohn Stultz <john.stultz@linaro.org>2014-07-23 10:17:58 -0700
commit0077dc60f274b9a7e9aa705a34784fefb87e0eee (patch)
treea4ec63fa3836caf78a9cc6c3bf484bbf883f610d /include/linux/timekeeping.h
parenta016a5bd62e29a738531d9d4d925037a1fdb52f5 (diff)
timekeeping: Provide ktime_get_with_offset()
Provide a helper function which lets us implement ktime_t based interfaces for real, boot and tai clocks. 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, 9 insertions, 0 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 3eb19e34cc20..a58e4b1879db 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -98,7 +98,16 @@ extern void getboottime(struct timespec *ts);
/*
* ktime_t based interfaces
*/
+
+enum tk_offsets {
+ TK_OFFS_REAL,
+ TK_OFFS_BOOT,
+ TK_OFFS_TAI,
+ TK_OFFS_MAX,
+};
+
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);