#include <windows.h>
#include <iostream>
LARGE_INTEGER t1,t2,feq;
QueryPerformanceFrequency(&feq);//每秒跳动次数
QueryPerformanceCounter(&t1);//测前跳动次数
for(int i = 0;i<10000;i++);
QueryPerformanceCounter(&t2);//测后跳动次数
double d=((double)t2.QuadPart-(double)t1.QuadPart)/((double)feq.QuadPart);//时间差秒
std::cout<<d<<std::endl;