From f7339cb21d4d1952c2c9fede8bd467111b04cd57 Mon Sep 17 00:00:00 2001 From: Nick Kane Date: Mon, 19 Nov 2018 11:44:06 +0000 Subject: [PATCH] replacing clock printing with macro --- algorithms/grokking-algorithms/lib/algorithms.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/algorithms/grokking-algorithms/lib/algorithms.c b/algorithms/grokking-algorithms/lib/algorithms.c index 7b1e6ee..b143d12 100644 --- a/algorithms/grokking-algorithms/lib/algorithms.c +++ b/algorithms/grokking-algorithms/lib/algorithms.c @@ -63,8 +63,7 @@ Linear_Search_Int(int *buffer, int size, int search) } } stop_clock; - Spent_Time = time_delta(End_Time, Start_Time); - print_time(Spent_Time); + clock_print; return found; } @@ -96,8 +95,7 @@ Binary_Search_Int(int *buffer, int size, int search) } } stop_clock; - Spent_Time = time_delta(End_Time, Start_Time); - print_time(Spent_Time); + clock_print; return found; } @@ -129,8 +127,7 @@ Bubble_Sort(int *buffer, int size) } } stop_clock; - Spent_Time = time_delta(End_Time, Start_Time); - print_time(Spent_Time); + clock_print; return 0; }