Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c6b0f3a4 authored by BOULLE Olivier's avatar BOULLE Olivier
Browse files

timer time

parent bca32eef
No related branches found
No related tags found
No related merge requests found
......@@ -73,6 +73,8 @@ void process_file_part(const std::string& input_filename, int part_id, int start
*/
std::cout << "thread " << part_id << " for lines " << start_line << " to " << end_line << std::endl;
auto start = std::chrono::high_resolution_clock::now();
std::ifstream input_read_file(input_filename);
if (!input_read_file.is_open()) {
......@@ -138,6 +140,10 @@ void process_file_part(const std::string& input_filename, int part_id, int start
}
input_read_file.close();
// end the timer and print the elapsed time
auto end = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> elapsed = end - start;
std::cout << elapsed.count() << "s for thread " << part_id << std::endl;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment