mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-11 10:23:06 +00:00
feat: cleanup
This commit is contained in:
parent
ac5559fb5f
commit
b298826381
@ -109,8 +109,7 @@ proc update(bucket: TokenBucket, currentTime: Moment) =
|
||||
else:
|
||||
updateStrict(bucket, currentTime)
|
||||
|
||||
## Returns the available capacity ratio of the bucket.
|
||||
## as a float number between 0.0 (empty) and 1.0 (full).
|
||||
## Returns the available capacity ratio of the bucket: 0.0 (empty); 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