Eclectic Media Git pingstats / 4a76bf3
Made script actually display lost packets Ariana Giroux 1 year, 9 months ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
6464 if line.lower().count('ttl'):
6565 y.append(float(line.split('time=')[1].split(' ')[0]))
6666
67 elif line.lower().count('timeout'):
68 y = -10
67 elif line.lower().count('0 received'):
68 y.append(-10)
6969
7070 if time.time() - time_start < 0.5: # Wait for time if no time elapsed
7171 time.sleep(0.5 - (time.time() - time_start))