mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-14 02:10:00 +08:00
fix rolling window bug (#340)
This commit is contained in:
@@ -96,7 +96,7 @@ func (rw *RollingWindow) updateOffset() {
|
||||
}
|
||||
|
||||
rw.offset = (offset + span) % rw.size
|
||||
rw.lastTime = timex.Now()
|
||||
rw.lastTime = time.Duration(int(rw.lastTime) + int(rw.interval)*span)
|
||||
}
|
||||
|
||||
type Bucket struct {
|
||||
|
||||
Reference in New Issue
Block a user