1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

dist/tools/sniffer: Fix usec calculation

This commit is contained in:
Joakim Gebart 2015-08-14 16:45:15 +02:00
parent a967fabde1
commit 9968c59baa

View File

@ -86,7 +86,7 @@ def generate_pcap(port, out):
if pkt_header:
now = time()
sec = int(now)
usec = (int(now) - sec) * 100000
usec = int((now - sec) * 1000000)
length = int(pkt_header.group(1), 16)
out.write(pack('<LLLL', sec, usec, length, length))
out.flush()