diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-07-16 21:04:16 +0000 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2014-07-23 10:17:59 -0700 |
commit | b82c817e2d16e818c472eb71019de521816000a3 (patch) | |
tree | 2d35c8db2aac6e285c14c5db633d17875c929d76 /include/linux/timekeeping.h | |
parent | f5264d5d5a0729306cc792d84432b97785d2662a (diff) |
timekeeping; Use ktime_t based data for ktime_get_boottime()
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 | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 68e6678a743b..2fc606203c8c 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -108,7 +108,6 @@ 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_boottime(void); extern ktime_t ktime_get_monotonic_offset(void); extern ktime_t ktime_get_clocktai(void); @@ -120,6 +119,17 @@ static inline ktime_t ktime_get_real(void) return ktime_get_with_offset(TK_OFFS_REAL); } +/** + * ktime_get_boottime - Returns monotonic time since boot in ktime_t format + * + * This is similar to CLOCK_MONTONIC/ktime_get, but also includes the + * time spent in suspend. + */ +static inline ktime_t ktime_get_boottime(void) +{ + return ktime_get_with_offset(TK_OFFS_BOOT); +} + /* * RTC specific */ |