第一个boost程序---timer的使用
2014年4月10日14:42:42
使用VS2008新建一个控制台程序。
2014年4月10日14:42:42
使用VS2008新建一个控制台程序。
代码如下:
#include<boost/timer.hpp>
#include<iostream>
#include <stdlib.h>
using namespace boost;
using namespace std;
int main()
{
timer t;
cout<< t.elapsed_max()/3600<<"h"<<endl;
cout<< t.elapsed_min()<<"s"<<endl;
system("PAUSE");
cout<< t.elapsed()<<"s"<<endl;
system("PAUSE");
return 0;
}
学习如何使用boost库中的timer
本文介绍如何在控制台程序中使用boost库中的timer进行性能测量,包括获取最大、最小和当前时间。
5131

被折叠的 条评论
为什么被折叠?



