X-Git-Url: https://vgcfreebox.myrthtech.pt/gitweb/ue-pp-sortingalgorith.git/blobdiff_plain/08869ec7a7dd81f73c4e293d938cfefa57a32bf6..c88d1765baef7e1ec0b7433147cf6185e286df4f:/parallel-sorting.c diff --git a/parallel-sorting.c b/parallel-sorting.c index 109b116..98200b4 100644 --- a/parallel-sorting.c +++ b/parallel-sorting.c @@ -204,12 +204,13 @@ int main(int argc, char *argv[]) { } struct timespec end_sort_time; clock_gettime(CLOCK_MONOTONIC, &end_sort_time); - // ------------------------------- END WALL CLOCK TIME --------------------------------- - + // determine actual wall clock time double elapsed_time = (end_sort_time.tv_sec - start_sort_time.tv_sec); elapsed_time += (end_sort_time.tv_nsec - start_sort_time.tv_nsec) / 1e9; + // ------------------------------- END WALL CLOCK TIME --------------------------------- + if (!write_file(output_file)) { fprintf(stderr, "Failed to write output data.\n"); free(data);