Created
November 25, 2011 12:16
-
-
Save fjolnir/1393388 to your computer and use it in GitHub Desktop.
This file contains 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
#define StartRecordTime( start ) \ | |
__asm mov saved_ebx, ebx \ | |
__asm xor eax, eax \ | |
__asm cpuid \ | |
__asm rdtsc \ | |
__asm mov start, eax \ | |
__asm xor eax, eax \ | |
__asm cpuid | |
#define StopRecordTime( end ) \ | |
__asm xor eax, eax \ | |
__asm cpuid \ | |
__asm rdtsc \ | |
__asm mov end, eax \ | |
__asm mov ebx, saved_ebx \ | |
__asm xor eax, eax \ | |
__asm cpuid |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment