summaryrefslogtreecommitdiff
path: root/src/ratelimit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-24 01:45:54 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-24 01:45:54 +0200
commit871d7de47c13ee6cd78b8eefdf9128be3c740ac0 (patch)
treec92b146f086cdf7a58145e4e744133e645f8c8e0 /src/ratelimit.c
parent4288f619215e3dda0b75113d78e4fb7ba219ed58 (diff)
timer: fully implement timer units
Diffstat (limited to 'src/ratelimit.c')
-rw-r--r--src/ratelimit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ratelimit.c b/src/ratelimit.c
index 1e5ed03c55..fc0f71de8b 100644
--- a/src/ratelimit.c
+++ b/src/ratelimit.c
@@ -28,21 +28,21 @@
* <hidave.darkstar@gmail.com>, which is licensed GPLv2. */
bool ratelimit_test(RateLimit *r) {
- usec_t timestamp;
+ usec_t ts;
- timestamp = now(CLOCK_MONOTONIC);
+ ts = now(CLOCK_MONOTONIC);
assert(r);
assert(r->interval > 0);
assert(r->burst > 0);
if (r->begin <= 0 ||
- r->begin + r->interval < timestamp) {
+ r->begin + r->interval < ts) {
if (r->n_missed > 0)
log_warning("%u events suppressed", r->n_missed);
- r->begin = timestamp;
+ r->begin = ts;
/* Reset counters */
r->n_printed = 0;