标签:
#include <ctime> #include <iostream> using namespace std; int main(void) { long i = 100000000L; clock_t start, finish; start = clock(); while (i--) { /* do something */ } finish = clock(); cout << "time:" << (double)(finish - start) / CLOCKS_PER_SEC; system("pause"); }
标签:
原文地址:http://www.cnblogs.com/zhanghuaye/p/5089872.html