Last active
April 6, 2021 08:32
-
-
Save esmitt/0b21d6b61e1f8341843cf9803444fd5e 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 <iostream> | |
#include <chrono> | |
int main() | |
{ | |
std::cout << "Starting computation ..." << std::endl; | |
auto start = std::chrono::steady_clock::now(); | |
// insert code to measure here | |
auto end = std::chrono::steady_clock::now(); | |
auto diff = end - start; | |
std::cout << "Time: " << std::chrono::duration <double, std::milli>(diff).count() << " ms" << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment