Skip to content

Instantly share code, notes, and snippets.

@N-Dekker
Created September 15, 2023 10:30
Show Gist options
  • Save N-Dekker/4c7ce78b741fa3f898f96cfc562bdd1c to your computer and use it in GitHub Desktop.
Save N-Dekker/4c7ce78b741fa3f898f96cfc562bdd1c to your computer and use it in GitHub Desktop.
#include <chrono>
using namespace std::chrono;
const auto timePoint = high_resolution_clock::now();
// Do the time consuming work here!
std::cout << " Duration: "
<< duration_cast<duration<double>>(high_resolution_clock::now() - timePoint).count() << " seconds" << std::endl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment