diff options
Diffstat (limited to 'util/throttle.lua')
-rw-r--r-- | util/throttle.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/throttle.lua b/util/throttle.lua index 8b62e797..2e901158 100644 --- a/util/throttle.lua +++ b/util/throttle.lua @@ -1,5 +1,6 @@ local gettime = require "socket".gettime; +local setmetatable = setmetatable; module "throttle" @@ -33,7 +34,7 @@ function throttle:poll(cost, split) if split then self.balance = 0; end - return false, balance, (cost-self.balance); + return false, balance, (cost-balance); end end |