diff util/throttle.lua @ 4541:05f5ec99da77

Merge with trunk
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Jan 2012 22:55:49 +0000
parents fc8a22936b3c
children 0e9a5b63206a
line wrap: on
line diff
--- a/util/throttle.lua	Sat Dec 10 17:21:19 2011 +0000
+++ b/util/throttle.lua	Sun Jan 22 22:55:49 2012 +0000
@@ -1,5 +1,6 @@
 
 local gettime = require "socket".gettime;
+local setmetatable = setmetatable;
 
 module "throttle"
 
@@ -33,7 +34,7 @@
 		if split then
 			self.balance = 0;
 		end
-		return false, balance, (cost-self.balance);
+		return false, balance, (cost-balance);
 	end
 end