Fixed issue when 0 packets are sent

This commit is contained in:
vauden
2024-11-06 00:38:46 +01:00
parent f45a755633
commit 00fcdacf31
3 changed files with 6 additions and 2 deletions

View File

@@ -68,6 +68,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];