您的位置:首页 > 其它

Boost 入门之3 - 测量时间流逝

2016-04-08 11:41 260 查看
#include <Windows.h>
#include <iostream>
using namespace std;

#include <boost/timer.hpp>
#include <boost/progress.hpp>
using namespace boost;
int main(int argc, char* argv[])
{
timer t;
Sleep(1000);
cout << t.elapsed() << endl;//1s

t.restart();
Sleep(3000);
cout << t.elapsed() << endl;//3s
getchar();
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  boost