Created
April 17, 2020 17:12
-
-
Save akbiggs/4bf2962d368f74c224dc8d5f5c628821 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
std::chrono::time_point<std::chrono::high_resolution_clock> p1; | |
std::chrono::time_point<std::chrono::high_resolution_clock> p2; | |
std::string tag; | |
#define START_PROFILE(t) tag = t; cout << "start " << tag << std::endl; p1 = std::chrono::high_resolution_clock::now(); | |
#define END_PROFILE() p2 = std::chrono::high_resolution_clock::now(); cout << "end " << tag << " " << std::chrono::duration<double, std::milli>(p2 - p1).count() << std::endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment