Comparison

net/server_select.lua @ 6540:31a8b3bfb31d

net.server_select: In add_task timer callback, use passed in time rather than re-fetching
author daurnimator <quae@daurnimator.com>
date Thu, 15 Jan 2015 09:05:08 -0500
parent 6539:f923140ee7c5
child 6541:a702786f4f31
comparison
equal deleted inserted replaced
6539:f923140ee7c5 6540:31a8b3bfb31d
846 return add_task(r, callback); 846 return add_task(r, callback);
847 end 847 end
848 end 848 end
849 end 849 end
850 850
851 addtimer(function() 851 addtimer(function(current_time)
852 local current_time = luasocket_gettime();
853 if #new_data > 0 then 852 if #new_data > 0 then
854 for _, d in pairs(new_data) do 853 for _, d in pairs(new_data) do
855 table_insert(data, d); 854 table_insert(data, d);
856 end 855 end
857 new_data = {}; 856 new_data = {};