summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/sniffer/pcap.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/link/sniffer/pcap.go')
-rw-r--r--pkg/tcpip/link/sniffer/pcap.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/tcpip/link/sniffer/pcap.go b/pkg/tcpip/link/sniffer/pcap.go
index c16c19647..45475dcf1 100644
--- a/pkg/tcpip/link/sniffer/pcap.go
+++ b/pkg/tcpip/link/sniffer/pcap.go
@@ -55,8 +55,7 @@ type pcapPacketHeader struct {
OriginalLength uint32
}
-func newPCAPPacketHeader(incLen, orgLen uint32) pcapPacketHeader {
- now := time.Now()
+func newPCAPPacketHeader(now time.Time, incLen, orgLen uint32) pcapPacketHeader {
return pcapPacketHeader{
Seconds: uint32(now.Unix()),
Microseconds: uint32(now.Nanosecond() / 1000),