#pragma once #include #include template void measure_time(Callable&& callable) { using namespace std::chrono; steady_clock::time_point t_start = steady_clock::now(); callable(); duration time_span = duration_cast>(steady_clock::now() - t_start); std::cout << "took " << time_span.count() << " seconds\n"; } template void measure_time_with_dry_run(Callable&& callable) { callable(); measure_time(std::forward(callable)); }