aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/timekeeping.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/timekeeping.h')
-rw-r--r--include/linux/timekeeping.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 3eaae4754275..99176af216af 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -214,12 +214,18 @@ static inline u64 ktime_get_boot_ns(void)
214 return ktime_to_ns(ktime_get_boottime()); 214 return ktime_to_ns(ktime_get_boottime());
215} 215}
216 216
217static inline u64 ktime_get_tai_ns(void)
218{
219 return ktime_to_ns(ktime_get_clocktai());
220}
221
217static inline u64 ktime_get_raw_ns(void) 222static inline u64 ktime_get_raw_ns(void)
218{ 223{
219 return ktime_to_ns(ktime_get_raw()); 224 return ktime_to_ns(ktime_get_raw());
220} 225}
221 226
222extern u64 ktime_get_mono_fast_ns(void); 227extern u64 ktime_get_mono_fast_ns(void);
228extern u64 ktime_get_raw_fast_ns(void);
223 229
224/* 230/*
225 * Timespec interfaces utilizing the ktime based ones 231 * Timespec interfaces utilizing the ktime based ones
@@ -242,6 +248,9 @@ static inline void timekeeping_clocktai(struct timespec *ts)
242/* 248/*
243 * RTC specific 249 * RTC specific
244 */ 250 */
251extern bool timekeeping_rtc_skipsuspend(void);
252extern bool timekeeping_rtc_skipresume(void);
253
245extern void timekeeping_inject_sleeptime64(struct timespec64 *delta); 254extern void timekeeping_inject_sleeptime64(struct timespec64 *delta);
246 255
247/* 256/*
@@ -253,17 +262,14 @@ extern void getnstime_raw_and_real(struct timespec *ts_raw,
253/* 262/*
254 * Persistent clock related interfaces 263 * Persistent clock related interfaces
255 */ 264 */
256extern bool persistent_clock_exist;
257extern int persistent_clock_is_local; 265extern int persistent_clock_is_local;
258 266
259static inline bool has_persistent_clock(void)
260{
261 return persistent_clock_exist;
262}
263
264extern void read_persistent_clock(struct timespec *ts); 267extern void read_persistent_clock(struct timespec *ts);
268extern void read_persistent_clock64(struct timespec64 *ts);
265extern void read_boot_clock(struct timespec *ts); 269extern void read_boot_clock(struct timespec *ts);
270extern void read_boot_clock64(struct timespec64 *ts);
266extern int update_persistent_clock(struct timespec now); 271extern int update_persistent_clock(struct timespec now);
272extern int update_persistent_clock64(struct timespec64 now);
267 273
268 274
269#endif 275#endif