diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-07-16 21:04:13 +0000 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2014-07-23 10:17:58 -0700 |
commit | 0077dc60f274b9a7e9aa705a34784fefb87e0eee (patch) | |
tree | a4ec63fa3836caf78a9cc6c3bf484bbf883f610d /include/linux/timekeeping.h | |
parent | a016a5bd62e29a738531d9d4d925037a1fdb52f5 (diff) | |
download | op-kernel-dev-0077dc60f274b9a7e9aa705a34784fefb87e0eee.zip op-kernel-dev-0077dc60f274b9a7e9aa705a34784fefb87e0eee.tar.gz |
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.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 3eb19e3..a58e4b1 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); |