Note the limits on tickets and period

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