Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <boost/version.hpp>
- #include <boost/config.hpp>
- #include <boost/timer.hpp>
- #include <boost/progress.hpp>
- #include <ctime>
- using namespace std;
- int main()
- {
- // boost::progress_timer tt;
- boost::timer t;
- clock_t t1 = clock(); // cpu clock not wall time
- boost::progress_display pd(10000000000);
- for(int i = 0; i < 100000; i++)
- for(int j = 0; j < 100000; j++)
- {
- int x = 1;
- ++pd;
- }
- clock_t t2 = clock();
- std::cout << t.elapsed() << " s" << std::endl;
- std::cout << double(t2 - t1) / CLOCKS_PER_SEC << " s" << std::endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement