26 #define WIN32_LEAN_AND_MEAN 47 if(!QueryPerformanceFrequency(&li))
48 printf(
"QueryPerformanceFrequency failed!\n");
50 PCFreq = (double)li.QuadPart/1000.0;
52 QueryPerformanceCounter(&li);
64 QueryPerformanceCounter(&li);
65 return (
double)(li.QuadPart-
timerStart)/PCFreq;
67 struct timeval timerStop, timerElapsed;
68 gettimeofday(&timerStop, NULL);
69 timersub(&timerStop, &
timerStart, &timerElapsed);
70 return timerElapsed.tv_sec*1000.0+timerElapsed.tv_usec/1000.0;
struct timeval timerStart