Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit add548c

Browse files
committed
Fix #104
1 parent 670402e commit add548c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sample.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (s *ExpDecaySample) update(t time.Time, v int64) {
179179
s.t0 = t
180180
s.t1 = s.t0.Add(rescaleThreshold)
181181
for _, v := range values {
182-
v.k = v.k * math.Exp(-s.alpha*float64(s.t0.Sub(t0)))
182+
v.k = v.k * math.Exp(-s.alpha*s.t0.Sub(t0).Seconds())
183183
s.values.Push(v)
184184
}
185185
}

0 commit comments

Comments
 (0)