diff --git a/voter.go b/voter.go index 254fcb7..6b1bc1d 100644 --- a/voter.go +++ b/voter.go @@ -79,15 +79,14 @@ func (v *Voter) loop() { } func (v *Voter) poll() bool { - // mean: v.period, max: v.period*2 - t := time.NewTimer(randDurationN(v.period * 2)) + t := time.NewTimer(randDurationN(v.period)) defer t.Stop() t2 := &time.Timer{} if v.vote.NumPollsSinceChange <= 10 { // mean: 100ms, max: 200ms - t2 = time.NewTimer(randDurationN(100 * time.Millisecond * 2)) + t2 = time.NewTimer(randDurationN(100 * time.Millisecond)) defer t2.Stop() }