Skip to content

Instantly share code, notes, and snippets.

@jsxinvivo
Created February 9, 2016 15:21
Show Gist options
  • Save jsxinvivo/1428a3d1ecfa8bab90c9 to your computer and use it in GitHub Desktop.
Save jsxinvivo/1428a3d1ecfa8bab90c9 to your computer and use it in GitHub Desktop.
Get high res timing in C++
auto start = std::chrono::high_resolution_clock::now();
//...
auto elapsed = std::chrono::high_resolution_clock::now() - start;
long long microseconds = std::chrono::duration_cast<std::chrono::microseconds>(elapsed).count();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment