From 871d7de47c13ee6cd78b8eefdf9128be3c740ac0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 24 May 2010 01:45:54 +0200 Subject: timer: fully implement timer units --- src/ratelimit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ratelimit.c') 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 @@ * , 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; -- cgit v1.2.3-54-g00ecf