From fc4981e3ea863632c88e5f0b308ae4532d077e49 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 13 Dec 2020 12:35:33 +0100 Subject: Added execution timers --- 2020/11/solve.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '2020/11/solve.c') diff --git a/2020/11/solve.c b/2020/11/solve.c index 2b613cf..d69fd36 100644 --- a/2020/11/solve.c +++ b/2020/11/solve.c @@ -1,8 +1,8 @@ -#include #include #include #include #include +#include #define SIZE 10000 #define X_MAX 99 @@ -201,8 +201,11 @@ int main(int argc, char *argv[]) char buf[SIZE] = { 0 }; fread(buf, SIZE, 1, fp); + clock_t tic = clock(); printf("%d\n", part_one(buf)); printf("%d\n", part_two(buf)); + clock_t toc = clock(); + printf("TIME: %f seconds\n", (double)(toc - tic) / CLOCKS_PER_SEC); fclose(fp); return 0; -- cgit v1.2.3