Skip to content

Instantly share code, notes, and snippets.

@tanakh
Last active April 4, 2018 10:23
Show Gist options
  • Save tanakh/6a16219db663a3ae743a49b6c9568134 to your computer and use it in GitHub Desktop.
Save tanakh/6a16219db663a3ae743a49b6c9568134 to your computer and use it in GitHub Desktop.
#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