#define rdtsc _asm _emit 0x0f _asm _emit 0×31
__try {
_asm {
// Get the count before calling the known delay function
rdtsc
mov esi, eax
mov edi, edx
// call the delay function
push uiParameter
call DelayFunction
pop ebx
// Get the count after the delay function
rdtsc
mov t1Hi, edx
mov t1Lo, eax
mov t0Hi, edi
mov t0Lo, esi
}
} __except (1) {
// Something horrible has happened. Abort
return 0;
}
#undef rdtsc
I thought the comment at the end was hilarious and had to share. It sums up in a handful of words all the dynamics of the contemporary man-machine relationship. Maybe I have been coding for too long.

