Created
May 20, 2015 15:23
-
-
Save anirul/2b7060f377203340a3a4 to your computer and use it in GitHub Desktop.
Count time of action (using chrono)
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> | |
#include <iostream> | |
int main(int ac, char** av) { | |
auto start = std::chrono::system_clock::now(); | |
// action | |
auto end = std::chrono::system_clock::now(); | |
std::chrono::duration<double> total = end - start; | |
std::cout << "time : " << total.count(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment