aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/throttle.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/throttle.c b/util/throttle.c
index 706c13111e..ec70476f8f 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) / NANOSECONDS_PER_SECOND;
+ leak = (bkt->avg * (double) delta_ns) / NSEC_PER_SEC;
/* 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 * NANOSECONDS_PER_SECOND;
+ double wait = extra * NSEC_PER_SEC;
wait /= limit;
return wait;
}