Skip to content

Commit

Permalink
fix: average jitter calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-esk committed Dec 14, 2023
1 parent 1cc7b33 commit 4803195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func MeasureJitter(address string, numPackets int, packetTimeout time.Duration,
}

if prevLatency != 0 {
jitter := latency - prevLatency
jitter := (latency - prevLatency).Abs()
totalJitter += jitter
}

Expand Down

0 comments on commit 4803195

Please sign in to comment.