Merge 0.10->trunk
authorKim Alvefur <zash@zash.se>
Tue, 05 May 2015 01:34:20 +0200
changeset 6653 cf15b18e9810
parent 6650 0c363fddcdd9 (current diff)
parent 6652 99fa40d498cc (diff)
child 6669 42fdc8dddf04
Merge 0.10->trunk
--- a/util/events.lua	Sun May 03 18:39:27 2015 +0200
+++ b/util/events.lua	Tue May 05 01:34:20 2015 +0200
@@ -9,6 +9,7 @@
 
 local pairs = pairs;
 local t_insert = table.insert;
+local t_remove = table.remove;
 local t_sort = table.sort;
 local setmetatable = setmetatable;
 local next = next;
@@ -118,7 +119,7 @@
 		if not w then return; end
 		for i = #w, 1 do
 			if w[i] == wrapper then
-				table.remove(w, i);
+				t_remove(w, i);
 			end
 		end
 		if #w == 0 then
--- a/util/statistics.lua	Sun May 03 18:39:27 2015 +0200
+++ b/util/statistics.lua	Tue May 05 01:34:20 2015 +0200
@@ -88,7 +88,7 @@
 
 			return function (value)
 				n_actual_events = n_actual_events + 1;
-				if n_actual_events%duration_sample_interval > 0 then
+				if n_actual_events%duration_sample_interval == 1 then
 					last_event = (last_event%duration_max_samples) + 1;
 					events[last_event] = value;
 				end
@@ -113,7 +113,7 @@
 
 			return function ()
 				n_actual_events = n_actual_events + 1;
-				if n_actual_events%duration_sample_interval > 0 then
+				if n_actual_events%duration_sample_interval ~= 1 then
 					return nop_function;
 				end