diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-07-17 01:04:16 +0400 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2014-07-23 21:17:59 +0400 |
commit | b82c817e2d16e818c472eb71019de521816000a3 (patch) | |
tree | 2d35c8db2aac6e285c14c5db633d17875c929d76 /include/linux | |
parent | f5264d5d5a0729306cc792d84432b97785d2662a (diff) | |
download | linux-b82c817e2d16e818c472eb71019de521816000a3.tar.xz |
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')
-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 */ |