unsigned long long native_sched_clock(void); from asm/timer.h for x86
unsigned long long sched_clock(void); from linux/sched.h for any arch
These are the wrappers around rdtsc - tick the counter counter.
update
there is also linux/clocksource.h
timecounter_init - initialize a time counter timecounter_read - return nanoseconds elapsed since timecounter_init()
source share