1 #include<iostream> 2 #include<ctime> 3 using namespace std; 4 int main() 5 { 6 time_t begin,end; 7 begin=clock(); 8 cout<<"**************************\n\n\n\n\n\nI love you!\n\n\n\n\n**************************"<<endl; 9 end=clock(); 10 cout<<"runtime:"<<double(end-begin)/CLOCKS_PER_SEC<<"s"<<endl; 11 }
原文:http://www.cnblogs.com/jiu0821/p/4395941.html