Skip to content

Commit db6bb65

Browse files
committed
add
1 parent 4dbbb4a commit db6bb65

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

limit/token_bucket.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ func NewTokenBucket(maxCount int64,interval time.Duration)*TokenBucket {
1212
t := TokenBucket{}
1313
t.tokenPool = make(chan bool,maxCount)
1414
go func() {
15+
// it mean how many time per time.
1516
ti := time.NewTicker(time.Duration(interval.Nanoseconds()/(maxCount*1000*1000))* time.Millisecond)
1617
for {
1718
select {

0 commit comments

Comments
 (0)