2 #include "hrpsys/util/Hrpsys.h" 11 QueryPerformanceCounter(&t);
13 #elif defined(__ARM_ARCH_7A__) 15 asm volatile(
"mrc p15, 0, %0, c9, c13, 0" :
"=r"(r) );
17 #elif defined(__AARCH64EL__) 19 asm volatile(
"mrs %0, pmccntr_el0" :
"=r"(
b) ::
"memory" );
23 __asm__ __volatile__(
"rdtsc" :
"=a" (l),
"=d" (
h));
24 return (
unsigned long long)
h<<32|
l;
30 static double freq = -1;
31 if (freq != -1)
return freq;
34 QueryPerformanceFrequency(&li);
35 freq = (double)li.QuadPart;
38 freq = SYSPAGE_ENTRY( qtime )->cycles_per_sec;
40 std::ifstream
ifs(
"/proc/cpuinfo");
unsigned long long tick_t
double get_cpu_frequency()
get CPU frequency
tick_t get_tick()
get time stamp counter