util.timer: Pass current_time to timer callbacks

Sat, 03 Oct 2009 02:33:33 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 03 Oct 2009 02:33:33 +0100
changeset 1871
838d1317bca4
parent 1870
5b5e4a4ecb55
child 1872
1905eca82ddf

util.timer: Pass current_time to timer callbacks

util/timer.lua file | annotate | diff | comparison | revisions
--- a/util/timer.lua	Sat Oct 03 00:57:26 2009 +0100
+++ b/util/timer.lua	Sat Oct 03 02:33:33 2009 +0100
@@ -42,7 +42,7 @@
 		local t, func = d[1], d[2];
 		if t <= current_time then
 			data[i] = nil;
-			local r = func();
+			local r = func(current_time);
 			if type(r) == "number" then _add_task(r, func); end
 		end
 	end

mercurial