12 lines
324 B
Python
12 lines
324 B
Python
def filter_by_time(capture, start_ts, end_ts):
|
|
filtered = []
|
|
|
|
for packet in capture:
|
|
try:
|
|
frame_time = float(packet.frame_info.time_epoch)
|
|
if start_ts <= frame_time <= end_ts:
|
|
filtered.append(packet)
|
|
except Exception:
|
|
continue
|
|
|
|
return filtered
|