Boost中计时器(timer)的使用
#include <iostream>
#include <boost/timer.hpp>
int main() {
boost::timer t;
std::cout << "max " << t.elapsed_max()<< "s" <<std::endl;
std::cout << "min " << t.elapsed_min()<< "s" << std::endl;
std::cout << "elapsed " << t.elapsed() << "s" << std::endl;
t.restart();
std::cout << "elapsed " << t.elapsed() << "s" << std::endl;
std::cout << "elapsed " << t.elapsed() << "s" << std::endl;
std::cout << "elapsed " << t.elapsed() << "s" << std::endl;
std::cout << "elapsed " << t.elapsed() << "s" << std::endl;
std::cout << "elapsed " << t.elapsed() << "s" << std::endl;
return 0;
}