summaryrefslogtreecommitdiffstats
path: root/util/throttle.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/throttle.c')
-rw-r--r--util/throttle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/throttle.c b/util/throttle.c
index ec70476..706c131 100644
--- a/util/throttle.c
+++ b/util/throttle.c
@@ -36,7 +36,7 @@ void throttle_leak_bucket(LeakyBucket *bkt, int64_t delta_ns)
double leak;
/* compute how much to leak */
- leak = (bkt->avg * (double) delta_ns) / NSEC_PER_SEC;
+ leak = (bkt->avg * (double) delta_ns) / NANOSECONDS_PER_SECOND;
/* make the bucket leak */
bkt->level = MAX(bkt->level - leak, 0);
@@ -72,7 +72,7 @@ static void throttle_do_leak(ThrottleState *ts, int64_t now)
*/
static int64_t throttle_do_compute_wait(double limit, double extra)
{
- double wait = extra * NSEC_PER_SEC;
+ double wait = extra * NANOSECONDS_PER_SECOND;
wait /= limit;
return wait;
}
OpenPOWER on IntegriCloud