Permalink
Browse files

Merge pull request #15 from elrik75/master

fix pcaptest.go example according to new Time API
  • Loading branch information...
2 parents db5c518 + ec277ab commit 066cff1e0aeb6d19903ca5bebad9a648e7b40d29 @akrennmair committed Aug 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 tools/pcaptest/pcaptest.go
@@ -64,8 +64,8 @@ func main() {
for pkt := h.Next(); pkt != nil; pkt = h.Next() {
fmt.Printf("time: %d.%06d (%s) caplen: %d len: %d\nData:",
- int64(pkt.Time.Sec), int64(pkt.Time.Usec),
- time.Unix(int64(pkt.Time.Sec), 0).String(), int64(pkt.Caplen), int64(pkt.Len))
+ int64(pkt.Time.Second()), int64(pkt.Time.Nanosecond()),
+ time.Unix(int64(pkt.Time.Second()), 0).String(), int64(pkt.Caplen), int64(pkt.Len))
for i := uint32(0); i < pkt.Caplen; i++ {
if i%32 == 0 {
fmt.Printf("\n")

0 comments on commit 066cff1

Please sign in to comment.