Merge branch 'dev' of /var/lib/git/libucore into dev
This commit is contained in:
@@ -65,8 +65,8 @@ struct RateLimit {
|
||||
* @param tickets number of tickets (bucket depth)
|
||||
* @param period per this period
|
||||
*/
|
||||
#define UC_RATELIMIT_INITIALIZER(tickets, period)\
|
||||
{ tickets, period, tickets * period, 0}
|
||||
#define UC_RATELIMIT_INITIALIZER(tickets)\
|
||||
{ tickets, period, 0, -period}
|
||||
|
||||
|
||||
|
||||
@@ -79,9 +79,8 @@ struct RateLimit {
|
||||
* @param r RateLimit to initialize
|
||||
* @param tickets number of tickets (bucket depth)
|
||||
* @param period per this period
|
||||
* @param current_ts the current timestamp
|
||||
*/
|
||||
void uc_ratelimit_init(struct RateLimit *r, long tickets, long period, long current_ts);
|
||||
void uc_ratelimit_init(struct RateLimit *r, long tickets, long period);
|
||||
|
||||
/**
|
||||
* Reset a RateLimit, filling up the tickets again.
|
||||
|
||||
Reference in New Issue
Block a user