Add timer.h for benchmarking
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user