Merge branch 'master' of github.com:Namonay/ft_ping

This commit is contained in:
2024-11-08 16:15:45 +01:00
2 changed files with 8 additions and 0 deletions

6
.gitignore vendored
View File

@@ -1,5 +1,11 @@
<<<<<<< HEAD
.vscode .vscode
.cache .cache
generate_json.py generate_json.py
ft_ping ft_ping
=======
*.o
a.out
.vscode
>>>>>>> 00fcdacf31561477259f851446360c0b7fc79eb6

View File

@@ -72,6 +72,8 @@ double get_avg(double *timestamp_array)
double avg = 0; double avg = 0;
int i = 0; int i = 0;
if (timestamp_array[0] == 0)
return (0);
while (timestamp_array[i]) while (timestamp_array[i])
{ {
avg += timestamp_array[i]; avg += timestamp_array[i];