Skip to content

Instantly share code, notes, and snippets.

@scheibel
Created September 16, 2015 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scheibel/e08e8b586fb6f487a8d7 to your computer and use it in GitHub Desktop.
Save scheibel/e08e8b586fb6f487a8d7 to your computer and use it in GitHub Desktop.
C++ time measurement with STL
#include <chrono>
#include <iostream>
int main()
{
auto start = std::chrono::high_resolution_clock::now();
std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - start).count() << "ms" << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment