Skip to content

Commit 1759c35

Browse files
committed
use nanoseconds
1 parent 8111161 commit 1759c35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pcap/pcap.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (p *pcapImpl) capturePackets(done <-chan struct{}, interfaceName, bpfFilter
7474

7575
now := time.Now()
7676
if now.Sub(startTime) >= intervalLength {
77-
bufferLength := bufferTimeSum.Seconds() / intervalLength.Seconds()
77+
bufferLength := float64(bufferTimeSum.Nanoseconds()) / float64(intervalLength.Nanoseconds())
7878
printer.Debugf("Aproximate pcap buffer length: %v", bufferLength)
7979
bufferTimeSum = 0 * time.Second
8080
startTime = now

0 commit comments

Comments
 (0)