Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix pcaptest.go example according to new Time API

  • Loading branch information...
commit ec277ab8ae382a5bd9415413ff9b9b0aa298d352 1 parent db5c518
Guillaume Savary authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tools/pcaptest/pcaptest.go
View
4 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")
Please sign in to comment.
Something went wrong with that request. Please try again.