1 /* Public domain. */ 2 3 #ifndef _LINUX_TIMEKEEPING_H 4 #define _LINUX_TIMEKEEPING_H 5 6 #define ktime_get_boottime() ktime_get() 7 #define get_seconds() gettime() 8 9 static inline time_t 10 ktime_get_real_seconds(void) 11 { 12 return gettime(); 13 } 14 15 static inline ktime_t 16 ktime_get_real(void) 17 { 18 struct timespec ts; 19 nanotime(&ts); 20 return TIMESPEC_TO_NSEC(&ts); 21 } 22 23 static inline uint64_t 24 ktime_get_ns(void) 25 { 26 return ktime_get(); 27 } 28 29 #endif 30