From 1918becdf4b45578f07e4219a30071f401c04e3c Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Tue, 28 Jan 2025 16:10:54 -0500 Subject: [PATCH] human-friendly time printing --- examples/ISAM2_City10000.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/ISAM2_City10000.cpp b/examples/ISAM2_City10000.cpp index e5fe50951..aaad608ac 100644 --- a/examples/ISAM2_City10000.cpp +++ b/examples/ISAM2_City10000.cpp @@ -165,7 +165,8 @@ int main(int argc, char* argv[]) { // Print loop index and time taken in processor clock ticks if (index % 50 == 0 && key_s != key_t - 1) { std::cout << "index: " << index << std::endl; - std::cout << "acc_time: " << time_list.back() << std::endl; + std::cout << "acc_time: " << time_list.back() / CLOCKS_PER_SEC + << std::endl; } if (key_s == key_t - 1) { @@ -190,7 +191,7 @@ int main(int argc, char* argv[]) { clock_t end_time = clock(); clock_t total_time = end_time - start_time; - cout << "total_time: " << total_time << endl; + cout << "total_time: " << total_time / CLOCKS_PER_SEC << endl; /// Write results to file write_results(results, (key_t + 1));