Advertisement
Madmouse

the best way to do this for timing, but never for TIME

Sep 15th, 2014
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. static inline long unsigned int rdtsc(void) /// simply gets the processor tick count since the machine was turned on
  2. {                       /// it resets every 50 years, so im not too worried about it lol
  3.     long unsigned int x;
  4.     asm volatile ("rdtsc" : "=A" (x));
  5.     return x;
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement