#include <iostream>
#include <boost/timer.hpp>
using namespace boost;
using namespace std;
int main()
{
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;
return 0;
#include <boost/timer.hpp>
using namespace boost;
using namespace std;
int main()
{
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;
return 0;
}
#include <boost/progress.hpp>
#include <fstream>
#include <string>
#include <vector>
#include <iterator>
int main()
{
std::vector<std::string> v(100);
std::ofstream fs("test.txt");
boost::progress_display pd(v.size());
std::vector<std::string>::iterator pos;
for(pos=v.begin();pos!=v.end();++pos)
{
fs<<*pos<<std::endl;
++pd;
}
return 0;
}
765

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



