From 28514c0a57b2feba07a6598fc33e0cb70021d925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Tue, 15 Oct 2013 15:44:12 +0200 Subject: [PATCH] More limits clarification --- include/ucore/rate_limit.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ucore/rate_limit.h b/include/ucore/rate_limit.h index c5f8d9a..10bd00f 100644 --- a/include/ucore/rate_limit.h +++ b/include/ucore/rate_limit.h @@ -34,7 +34,7 @@ * * uc_ratelimit_init(&r,20, 1, time(NULL)); * - * NOTE. period * tickets * tickets must not exceed the value of a long + * NOTE. 2 * (period + 1) * tickets * 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. period * tickets * tickets must not exceed the range of the RateLimit.funds + * NOTE. 2 * (period + 1) * tickets * tickets must not exceed the range of the RateLimit.funds * * @param r RateLimit to initialize * @param tickets number of tickets (bucket depth)