diff options
Diffstat (limited to '2020/02')
-rw-r--r-- | 2020/02/solve.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/2020/02/solve.c b/2020/02/solve.c index 6294771..9a1631b 100644 --- a/2020/02/solve.c +++ b/2020/02/solve.c @@ -1,6 +1,6 @@ -#include <assert.h> #include <stdio.h> #include <stdlib.h> +#include <time.h> int part_one(FILE *fp) { @@ -51,9 +51,12 @@ int main(int argc, char *argv[]) if (!fp) exit(EXIT_FAILURE); + clock_t tic = clock(); printf("%d\n", part_one(fp)); rewind(fp); printf("%d\n", part_two(fp)); + clock_t toc = clock(); + printf("TIME: %f seconds\n", (double)(toc - tic) / CLOCKS_PER_SEC); fclose(fp); return 0; |