#include<iostream>#include<ctime>void do_something(){ for(int i=0;i<100000;i++)for(int j=0;j<10000;j++) ;}int main(int arg,char ** argv){ clock_t start = clock(); do_something(); clock_t end = clock(); double time = static_cast<double>(end-start)/CLOCKS_PER_SEC; std::cout << "time = " << time << std::endl; return 0;}