summaryrefslogtreecommitdiff
path: root/src/ratelimit.h
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2011-02-21 15:32:18 +0100
committerLennart Poettering <lennart@poettering.net>2011-02-28 23:04:18 +0100
commit4ce9faa9d283cbb4c46fd06138f6774579349fb7 (patch)
treed4211528629c353e19a4b27e5809a951a6b74b76 /src/ratelimit.h
parent35b8ca3aaf8cb044ad76675dfcad89e000dd4a5c (diff)
ratelimit: removed n_printed
Removed n_printed and renamed n_printed to num. This is not a logging rate limiter anymore.
Diffstat (limited to 'src/ratelimit.h')
-rw-r--r--src/ratelimit.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ratelimit.h b/src/ratelimit.h
index 2c77787d3c..a44ef70db4 100644
--- a/src/ratelimit.h
+++ b/src/ratelimit.h
@@ -28,15 +28,14 @@ typedef struct RateLimit {
usec_t interval;
usec_t begin;
unsigned burst;
- unsigned n_printed, n_missed;
+ unsigned num;
} RateLimit;
#define RATELIMIT_DEFINE(_name, _interval, _burst) \
RateLimit _name = { \
.interval = (_interval), \
.burst = (_burst), \
- .n_printed = 0, \
- .n_missed = 0, \
+ .num = 0, \
.begin = 0 \
}
@@ -45,8 +44,7 @@ typedef struct RateLimit {
RateLimit *_r = &(v); \
_r->interval = (_interval); \
_r->burst = (_burst); \
- _r->n_printed = 0; \
- _r->n_missed = 0; \
+ _r->num = 0; \
_r->begin = 0; \
} while (false);