StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
realcc.h
1 
2 // real clock count - low level timing information
3 static inline unsigned int realcc (void)
4 {
5 #ifdef __ALPHA
6 #define CYCLES_PER_SEC 466000000
7  unsigned long cc;
8  asm volatile("rpcc %0" : "=r"(cc) : : "memory");
9  return cc;
10 #elif defined (__I386)
11 #define CYCLES_PER_SEC 800000000
12  unsigned long eax, edx;
13  asm volatile("rdtsc":"=a" (eax), "=d" (edx));
14  return eax;
15 
16 #else
17  return 0;
18 
19 #endif
20 }