有时候经常需要测试算法的运行时间:
double time0 = static_cast<double>(getTickCount());
time0 = ((double)getTickCount() - time0) / getTickFrequency();
cout << "运行时间为:" << time0 << "秒" << endl;
有时候经常需要测试算法的运行时间:
double time0 = static_cast<double>(getTickCount());
time0 = ((double)getTickCount() - time0) / getTickFrequency();
cout << "运行时间为:" << time0 << "秒" << endl;