Stuart somthing like this, all though i could be wrong. but this does compile. im unsure on '_emit' convertion though.
kev
#include <windows.h> unsigned __int64 start, stop; unsigned __int64 nCtr, nFreq, nCtrStop; int CpuSpeed(void) { QueryPerformanceFrequency((LARGE_INTEGER *)&nFreq); // __asm__("_emit $0x0F"); // __asm__("_emit $0x31"); __asm__("mov _start,%eax"); __asm__("mov 4+(_start),%edx"); QueryPerformanceCounter((LARGE_INTEGER *)&nCtrStop); nCtrStop += nFreq; do { QueryPerformanceCounter((LARGE_INTEGER *)&nCtr); } while (nCtr < nCtrStop); // __asm__("_emit $0x0F"); // __asm__("_emit $0x31"); __asm__("mov %eax,_stop"); __asm__("mov %edx,4+(_stop)"); return ((stop-start)/1000000); }
kev