function throttle(func, limit) ⏎
local lastFunc
local lastRan
return function(...)
local context = self
local args = {...}
if not lastRan or os.clock() - lastRan >= limit then
func(table.unpack(args))
lastRan = os.clock()
else
lastFunc = function() func(table.unpack(args)) end
end
end
end