diff --git a/bar.go b/bar.go index fcd7efd..2dc35dc 100644 --- a/bar.go +++ b/bar.go @@ -283,8 +283,8 @@ } select { case b.operateState <- func(s *bState) { + s.ewmaUpdate(n, dur) s.current += n - s.ewmaUpdate(n, dur) if s.triggerComplete && s.current >= s.total { s.current = s.total s.completed = true