bhupixb

Estimated Time

Mar 30th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. using namespace chrono;
  2. int rand(int l, int r){
  3. static mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  4. uniform_int_distribution<int> uid(l, r); return uid(rng);
  5. }
  6. auto start1 = high_resolution_clock::now();
  7. auto stop1 = high_resolution_clock::now();
  8. cout << setw(20) << "Estimated Time: " << duration_cast<microseconds>(stop1 - start1).count() / 1000000.0 << " uS\n";
Add Comment
Please, Sign In to add comment