More ratelimit optimizations

This commit is contained in:
Nils O. Selåsdal
2013-10-15 21:35:10 +02:00
parent c1ef4af4ad
commit 0a36c669c6
2 changed files with 10 additions and 9 deletions
+2 -2
View File
@@ -34,7 +34,7 @@
*
* uc_ratelimit_init(&r,20, 1, time(NULL));
*
* NOTE. 2 * (period + 1) * tickets * tickets must not exceed the range of the RateLimit.funds
* NOTE. (period + 1) * tickets must not exceed the range of the RateLimit.funds
*
* for (;;) {
* int fd = accept(..);
@@ -67,7 +67,7 @@ struct RateLimit {
* Initialize a struct RateLimit, which can hand out @tickets per @period
* the perioid must be in the same units as the current_ts
*
* NOTE. 2 * (period + 1) * tickets * tickets must not exceed the range of the RateLimit.funds
* NOTE. 2 * (period + 1) * tickets must not exceed the range of the RateLimit.funds
*
* @param r RateLimit to initialize
* @param tickets number of tickets (bucket depth)