Skip to content
Snippets Groups Projects
Commit 9968c59b authored by Joakim Nohlgård's avatar Joakim Nohlgård
Browse files

dist/tools/sniffer: Fix usec calculation

parent a967fabd
No related branches found
No related tags found
No related merge requests found
...@@ -86,7 +86,7 @@ def generate_pcap(port, out): ...@@ -86,7 +86,7 @@ def generate_pcap(port, out):
if pkt_header: if pkt_header:
now = time() now = time()
sec = int(now) sec = int(now)
usec = (int(now) - sec) * 100000 usec = int((now - sec) * 1000000)
length = int(pkt_header.group(1), 16) length = int(pkt_header.group(1), 16)
out.write(pack('<LLLL', sec, usec, length, length)) out.write(pack('<LLLL', sec, usec, length, length))
out.flush() out.flush()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment