Commit b82c817e authored by Thomas Gleixner's avatar Thomas Gleixner Committed by John Stultz

timekeeping; Use ktime_t based data for ktime_get_boottime()

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent f5264d5d
...@@ -108,7 +108,6 @@ enum tk_offsets { ...@@ -108,7 +108,6 @@ enum tk_offsets {
extern ktime_t ktime_get(void); extern ktime_t ktime_get(void);
extern ktime_t ktime_get_with_offset(enum tk_offsets offs); 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_monotonic_offset(void);
extern ktime_t ktime_get_clocktai(void); extern ktime_t ktime_get_clocktai(void);
...@@ -120,6 +119,17 @@ static inline ktime_t ktime_get_real(void) ...@@ -120,6 +119,17 @@ static inline ktime_t ktime_get_real(void)
return ktime_get_with_offset(TK_OFFS_REAL); 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 * RTC specific
*/ */
......
...@@ -1565,23 +1565,6 @@ void get_monotonic_boottime(struct timespec *ts) ...@@ -1565,23 +1565,6 @@ void get_monotonic_boottime(struct timespec *ts)
} }
EXPORT_SYMBOL_GPL(get_monotonic_boottime); EXPORT_SYMBOL_GPL(get_monotonic_boottime);
/**
* ktime_get_boottime - Returns monotonic time since boot in a ktime
*
* Returns the monotonic time since boot in a ktime
*
* This is similar to CLOCK_MONTONIC/ktime_get, but also
* includes the time spent in suspend.
*/
ktime_t ktime_get_boottime(void)
{
struct timespec ts;
get_monotonic_boottime(&ts);
return timespec_to_ktime(ts);
}
EXPORT_SYMBOL_GPL(ktime_get_boottime);
/** /**
* monotonic_to_bootbased - Convert the monotonic time to boot based. * monotonic_to_bootbased - Convert the monotonic time to boot based.
* @ts: pointer to the timespec to be converted * @ts: pointer to the timespec to be converted
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment