一、配置环境
二、 插入代码段
/*方便的秒表*/
#include<boost\timer.hpp>
#include<iostream>
using namespace std;
using namespace boost;
int main(int argc, char **argv)
{
timer t;
cout << "max timespan:" << t.elapsed_max() / 3600 << "h" << endl;//可度量最大时间
cout << "min timespan:" << t.elapsed_min() << "s" << endl;//可度量的最小时间
cout << "now time elapsed:" << t.elapsed() << "s" << endl;//输出已经流逝时间
}
三、运行结果