Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. struct TimerCheck {
  2.     std::chrono::high_resolution_clock::time_point start;
  3.     TimerCheck():
  4.         start(std::chrono::high_resolution_clock::now())
  5.     {};
  6.     ~TimerCheck(){
  7.         auto end = std::chrono::high_resolution_clock::now();
  8.         auto diff =  std::chrono::duration_cast<std::chrono::milliseconds>(end-start).count();
  9.         cout << diff << endl;
  10.     };
  11. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement