第一个boost程序---timer的使用

来源:互联网 发布:蓝牙串口调试助手源码 编辑:程序博客网 时间:2024/04/30 21:52
第一个boost程序---timer的使用
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;}



0 0