1 /* Public domain. */ 2 3 #ifndef _LINUX_SCHED_CLOCK_H 4 #define _LINUX_SCHED_CLOCK_H 5 6 #include <sys/types.h> 7 8 #include <linux/time.h> 9 #include <linux/smp.h> 10 11 static inline uint64_t local_clock(void)12local_clock(void) 13 { 14 struct timespec ts; 15 nanouptime(&ts); 16 return (ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec; 17 } 18 19 #endif 20