Forked from deysumitkr/ExecutionTime_AlmostGeneric.cpp
Created
January 21, 2019 22:33
-
-
Save Felipeasg/b45c4368fb9e134683aa3275ba6fd667 to your computer and use it in GitHub Desktop.
Execution time of a code snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
auto start = std::chrono::high_resolution_clock::now(); | |
// Code to time | |
auto finish = std::chrono::high_resolution_clock::now(); | |
double duration = std::chrono::duration_cast<std::chrono::milliseconds>(finish - start).count(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment