测量函数的运行时间

#include <ctime>

    clock_t start = clock();      //获取当前系统时间
    /*插入函数*/
    clock_t end  = clock();
    double programTimes = ((double) end -start) / CLOCKS_PER_SEC;
    cout << programTimes << endl;

猜你喜欢

转载自blog.csdn.net/weixin_44650358/article/details/116449049