Skip to content

Instantly share code, notes, and snippets.

@naotokui
Created October 11, 2015 04:53
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 naotokui/603aa18fee584232363a to your computer and use it in GitHub Desktop.
Save naotokui/603aa18fee584232363a to your computer and use it in GitHub Desktop.
time elapsed time in c++
auto start = std::chrono::steady_clock::now();
// some task
auto end = std::chrono::steady_clock::now();
std::cout << "Elapsed time " << double((end-start).count())/double(std::chrono::steady_clock::period::den) << "s" << std::endl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment