mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-03 14:33:12 +00:00
feat: cleanup
This commit is contained in:
parent
0f3dfc82c6
commit
ac5559fb5f
@ -110,7 +110,7 @@ proc update(bucket: TokenBucket, currentTime: Moment) =
|
||||
updateStrict(bucket, currentTime)
|
||||
|
||||
## Returns the available capacity ratio of the bucket.
|
||||
## It is a float number between 0.0 (empty) and 1.0 (full).
|
||||
## as a float number between 0.0 (empty) and 1.0 (full).
|
||||
proc getAvailableCapacityRatio*(bucket: TokenBucket, currentTime: Moment): float =
|
||||
if periodElapsed(bucket, currentTime):
|
||||
return 1.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user