c++准确计时函数 QueryPerformance
头文件#include<windows.h>
LARGE_INTEGER t1, t2, tc;
QueryPerformanceFrequency(&tc);
QueryPerformanceCounter(&t1);
xxxx要测的代码
QueryPerformanceCounter(&t2);
cout << "TimeConsume:" << ((t2.QuadPart - t1.QuadPart)*1.0 / tc.QuadPart);