Modifications to how profiling is done -- GetMemUsage("StarTip", true). Passing true as 2nd parameter causes the function to update profiling data.
Scott Sibley [10-10-10 - 01:34]
Modifications to how profiling is done -- GetMemUsage("StarTip", true). Passing true as 2nd parameter causes the function to update profiling data.
diff --git a/Modules/UnitTooltip/UnitTooltip.lua b/Modules/UnitTooltip/UnitTooltip.lua
index 8920ffc..a39afdd 100644
--- a/Modules/UnitTooltip/UnitTooltip.lua
+++ b/Modules/UnitTooltip/UnitTooltip.lua
@@ -263,7 +263,7 @@ return value
name = "Memory Usage",
left = "return 'Memory Usage:'",
right = [[
-local mem, percent, memdiff, totalMem, totaldiff, memperc = GetMemUsage("StarTip")
+local mem, percent, memdiff, totalMem, totaldiff, memperc = GetMemUsage("StarTip", true)
if mem then
local num = floor(memperc)
if num < 1 then num = 1 end
@@ -280,7 +280,7 @@ end
desc = "Note that you must turn on CPU profiling",
left = 'return "CPU Usage:"',
right = [[
-local cpu, percent, cpudiff, totalCPU, totaldiff, cpuperc = GetCPUUsage("StarTip")
+local cpu, percent, cpudiff, totalCPU, totaldiff, cpuperc = GetCPUUsage("StarTip", true)
if cpu then
local num = floor(cpuperc)
if num < 1 then num = 1 end
diff --git a/StarTip.lua b/StarTip.lua
index a5b190b..ffc6b27 100644
--- a/StarTip.lua
+++ b/StarTip.lua
@@ -154,9 +154,7 @@ local options = {
type = "input",
set = function(info, v)
tinsert(timers, v)
- StarTip:RebuildOptsions()
- StarTip:OnDisable()
- StarTip:OnEnable()
+ StarTip:RebuildOpts()
StarTip:SetupTimers()
end,
order = 1
@@ -168,9 +166,7 @@ local options = {
func = function()
StarTip.db.profile.timers = nil
StarTip:SetupTimers()
- StarTip:RebuildOpts()
- StarTip:OnDisable()
- StarTip:OnEnable()
+ StarTip:RebuildOpts()
end,
order = 2
}