您的位置:首页 > 编程语言 > C语言/C++

用c++实现获取程序运行的时间

2015-04-06 14:48 246 查看
#include<iostream>
#include<ctime>
using namespace std;
int main()
{
time_t begin,end;
begin=clock();
cout<<"**************************\n\n\n\n\n\nI love you!\n\n\n\n\n**************************"<<endl;
end=clock();
cout<<"runtime:"<<double(end-begin)/CLOCKS_PER_SEC<<"s"<<endl;
}


View Code
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: