diff options
Diffstat (limited to 'src/shared/ratelimit.h')
-rw-r--r-- | src/shared/ratelimit.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/ratelimit.h b/src/shared/ratelimit.h index 07e8205c81..ad00267a6e 100644 --- a/src/shared/ratelimit.h +++ b/src/shared/ratelimit.h @@ -48,6 +48,13 @@ typedef struct RateLimit { _r->begin = 0; \ } while (false) +#define RATELIMIT_RESET(v) \ + do { \ + RateLimit *_r = &(v); \ + _r->num = 0; \ + _r->begin = 0; \ + } while (false) + bool ratelimit_test(RateLimit *r); #endif |