QueryPerformanceFrequency(&nFreq);QueryPerformanceCounter(&nBeginTime);Sleep(1000);QueryPerformanceCounter(&nEndTime);time = (double)(nEndTime.QuadPart - nBeginTime.QuadPart) / (double)nFreq.QuadPart;
QueryPerformanceFrequency(&nFreq);QueryPerformanceCounter(&nBeginTime);Sleep(1000);QueryPerformanceCounter(&nEndTime);time = (double)(nEndTime.QuadPart - nBeginTime.QuadPart) / (double)nFreq.QuadPart;