extern __inline__ unsigned long long int timer_read(void);
__inline__ unsigned long long int timer_read(void)
{
  unsigned long int low, high;
  unsigned long long int res;

  __asm__ __volatile__ 
    ("rdtsc"
     : "=a" (low), "=d" (high)
     : /* no inputs. */
     : "memory");

  res = high;
  res = res << 32;
  res = res | low;
  return res;
}

