Mercurial > wow > wowdb-profiler
changeset 459:22f08f6717ea
Updated timer loops to just use math.huge, since their iterations are evaluated in Lua.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Wed, 22 Jul 2015 23:18:04 -0400 |
parents | 866bba4d8ab6 |
children | 9f1d3224d316 |
files | Main.lua |
diffstat | 1 files changed, 3 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/Main.lua Tue Jul 21 18:48:31 2015 -0400 +++ b/Main.lua Wed Jul 22 23:18:04 2015 -0400 @@ -990,15 +990,9 @@ languages_known[_G.GetLanguageByIndex(index)] = true end - -- These two timers loop indefinitely by constantly resetting their remaining iterations to 100k. - item_process_timer_handle = C_Timer.NewTicker(30, function() - item_process_timer_handle._remainingIterations = 100000 - WDP:ProcessItems() - end, 100000) - target_location_timer_handle = C_Timer.NewTicker(0.5, function() - target_location_timer_handle._remainingIterations = 100000 - WDP:UpdateTargetLocation() - end, 100000) + -- These two timers loop indefinitely using Lua's infinity constant + item_process_timer_handle = C_Timer.NewTicker(30, WDP.ProcessItems, math.huge) + target_location_timer_handle = C_Timer.NewTicker(0.5, WDP.UpdateTargetLocation, math.huge) _G.hooksecurefunc("UseContainerItem", function(bag_index, slot_index, target_unit) if target_unit then