Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
stop_watch sw;
...
auto m = sw.elapsed_ms().count();
cout << "Elapsed time is " << m << " milliseconds.\n";
sw.restart()
...
m = sw.elapsed_us().count();
cout << "Elapsed time is " << m << " microseconds.\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment