Add timer.h for benchmarking

This commit is contained in:
2025-12-01 03:30:55 -05:00
parent 66c39108ce
commit 226db6a276

View File

@@ -21,7 +21,7 @@ public:
const auto seconds = std::chrono::duration_cast<std::chrono::seconds>(end - start);
const auto ms = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
const auto us = std::chrono::duration_cast<std::chrono::microseconds>(end - start);
std::cout << "Execution time: \n\t" << seconds.count() << " s\n\t" << ms.count() << " ms\n\t" << us.count() << " us" << std::endl;
std::cout << "\n# Execution time # \n\t" << seconds.count() << " s\n\t" << ms.count() << " ms\n\t" << us.count() << " us" << std::endl;
}
private: