xref: /linux/kernel/time/timekeeping_internal.h (revision 3a978377)
1 #ifndef _TIMEKEEPING_INTERNAL_H
2 #define _TIMEKEEPING_INTERNAL_H
3 /*
4  * timekeeping debug functions
5  */
6 #include <linux/clocksource.h>
7 #include <linux/time.h>
8 
9 #ifdef CONFIG_DEBUG_FS
10 extern void tk_debug_account_sleep_time(struct timespec64 *t);
11 #else
12 #define tk_debug_account_sleep_time(x)
13 #endif
14 
15 static inline cycle_t clocksource_delta(cycle_t now, cycle_t last, cycle_t mask)
16 {
17 	return (now - last) & mask;
18 }
19 
20 #endif /* _TIMEKEEPING_INTERNAL_H */
21