Last active
April 4, 2018 10:23
-
-
Save tanakh/6a16219db663a3ae743a49b6c9568134 to your computer and use it in GitHub Desktop.
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> | |
int main() | |
{ | |
auto start = std::chrono::system_clock::now(); | |
// foo(); | |
auto end = std::chrono::system_clock::now(); | |
// elapsed time in seconds | |
std::chrono::duration<double> secs = end - start; | |
// elapsed time in milli seconds | |
std::chrono::duration<double, std::milli> millis = end - start; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment