Created
December 6, 2012 16:08
-
-
Save YukiSakamoto/4225635 to your computer and use it in GitHub Desktop.
Read Time Stamp Counter of IA-64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdint.h> | |
| uint64_t rdtsc(void) | |
| { | |
| uint64_t ret; | |
| __asm__ volatile("rdtsc" : "=A"(ret)); | |
| return ret; | |
| } | |
| int main(void) | |
| { | |
| printf("clock conut = 0x%llx\n", rdtsc()); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment