Merge pull request #978 from lutherlau/patch-1

Update gtimer_timer.go
This commit is contained in:
John Guo
2020-11-12 20:39:57 +08:00
committed by GitHub

View File

@ -233,7 +233,7 @@ func (t *Timer) binSearchIndex(n int64) (index int, result int) {
mid := 0
cmp := -2
for min <= max {
mid = int((min + max) / 2)
mid = min + int((max-min)/2)
switch {
case t.wheels[mid].intervalMs == n:
cmp = 0