0
点赞
收藏
分享

微信扫一扫

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


#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;
}


举报

相关推荐

0 条评论