Permalink
Browse files

Merge pull request #21 from tsg/upstream

Fixed precision of timestmaps.
  • Loading branch information...
2 parents 2051aa6 + c598ed4 commit e9a12e1c1c1b2e06d5e8606f0a8afa53a910eb18 @akrennmair committed Feb 25, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 pcap.go
View
@@ -107,7 +107,7 @@ func (p *Pcap) NextEx() (pkt *Packet, result int32) {
return
}
pkt = new(Packet)
- pkt.Time = time.Unix(int64(pkthdr.ts.tv_sec), int64(pkthdr.ts.tv_usec))
+ pkt.Time = time.Unix(int64(pkthdr.ts.tv_sec), int64(pkthdr.ts.tv_usec)*1000)
pkt.Caplen = uint32(pkthdr.caplen)
pkt.Len = uint32(pkthdr.len)
pkt.Data = make([]byte, pkthdr.caplen)

0 comments on commit e9a12e1

Please sign in to comment.