diff --git a/.gitignore b/.gitignore index 2ec987a..c07dfad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,11 @@ +<<<<<<< HEAD .vscode .cache generate_json.py ft_ping +======= +*.o +a.out +.vscode +>>>>>>> 00fcdacf31561477259f851446360c0b7fc79eb6 diff --git a/src/utils.c b/src/utils.c index f680b1b..38cf756 100644 --- a/src/utils.c +++ b/src/utils.c @@ -72,6 +72,8 @@ double get_avg(double *timestamp_array) double avg = 0; int i = 0; + if (timestamp_array[0] == 0) + return (0); while (timestamp_array[i]) { avg += timestamp_array[i];