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.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h
index 86bc2026efce..5d738804e3d6 100644
--- a/include/linux/timekeeping.h
+++ b/include/linux/timekeeping.h
@@ -21,6 +21,21 @@ extern int do_sys_settimeofday64(const struct timespec64 *tv,
21 const struct timezone *tz); 21 const struct timezone *tz);
22 22
23/* 23/*
24 * ktime_get() family: read the current time in a multitude of ways,
25 *
26 * The default time reference is CLOCK_MONOTONIC, starting at
27 * boot time but not counting the time spent in suspend.
28 * For other references, use the functions with "real", "clocktai",
29 * "boottime" and "raw" suffixes.
30 *
31 * To get the time in a different format, use the ones wit
32 * "ns", "ts64" and "seconds" suffix.
33 *
34 * See Documentation/core-api/timekeeping.rst for more details.
35 */
36
37
38/*
24 * timespec64 based interfaces 39 * timespec64 based interfaces
25 */ 40 */
26extern void ktime_get_raw_ts64(struct timespec64 *ts); 41extern void ktime_get_raw_ts64(struct timespec64 *ts);
@@ -177,7 +192,7 @@ static inline time64_t ktime_get_clocktai_seconds(void)
177extern bool timekeeping_rtc_skipsuspend(void); 192extern bool timekeeping_rtc_skipsuspend(void);
178extern bool timekeeping_rtc_skipresume(void); 193extern bool timekeeping_rtc_skipresume(void);
179 194
180extern void timekeeping_inject_sleeptime64(struct timespec64 *delta); 195extern void timekeeping_inject_sleeptime64(const struct timespec64 *delta);
181 196
182/* 197/*
183 * struct system_time_snapshot - simultaneous raw/real time capture with 198 * struct system_time_snapshot - simultaneous raw/real time capture with
@@ -243,7 +258,8 @@ extern void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot);
243extern int persistent_clock_is_local; 258extern int persistent_clock_is_local;
244 259
245extern void read_persistent_clock64(struct timespec64 *ts); 260extern void read_persistent_clock64(struct timespec64 *ts);
246extern void read_boot_clock64(struct timespec64 *ts); 261void read_persistent_clock_and_boot_offset(struct timespec64 *wall_clock,
262 struct timespec64 *boot_offset);
247extern int update_persistent_clock64(struct timespec64 now); 263extern int update_persistent_clock64(struct timespec64 now);
248 264
249/* 265/*