/* This version should work correctly with PowerNow and other schemes that vary CPU frequency. Link to ws2_32.lib kernel32.lib */ #include #include #include #include #define BSIZ 26 main(int argc,char *argv[]){ LARGE_INTEGER lpc1,lpc2,lpf; char cmdln[500],*p; int i; char hostname[50]; LPWSADATA lpWSAData; time_t time_s,time_f; wchar_t buf_s[BSIZ], buf_f[BSIZ]; errno_t err; WORD wVersionRequested; WSADATA wsaData; QueryPerformanceCounter(&lpc1); QueryPerformanceFrequency(&lpf); p=cmdln; strcpy(cmdln,argv[1]); p+=strlen(argv[1]); for(i=2; i