Created
January 18, 2023 14:16
-
-
Save cutebomb/68823feeb900c908254dd54df63a8adf to your computer and use it in GitHub Desktop.
c++ run time code
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> | |
using namespace std::chrono; | |
auto start = high_resolution_clock::now(); | |
// some code here | |
auto stop = high_resolution_clock::now(); | |
auto duration = duration_cast<milliseconds>(stop - start); | |
cout << duration.count() << "ms" << endl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment