> timeCount = 0 > timeDelay = 1 > function timeThrottle() timeCount = timeCount - timePassed if timeCount > 0 th en return end timeCount = timeDelay end > function timeThrottle(timePassed) timeCount = timeCount - timePassed if timeCount > 0 then return end timeCount = timeDelay end > function wrapper() local a=os.clock() for i=1,1000000 do timeThrottle(1) end print(os.clock()-a) end > beep = {} > function tableThrottle() if not next(beep) then return end end > function wrapper2() local a=os.clock() for i=1,1000000 do tableThrottle() end print(os.clock()-a) end > wrapper() 0.35900000000004 > wrapper2() 0.23400000000004