Skip to content

Commit

Permalink
better fix for profiling prints
Browse files Browse the repository at this point in the history
WowAce issue 1155
  • Loading branch information
Stanzilla committed Jul 28, 2018
1 parent fcb2bf5 commit dbe4ef8
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions WeakAuras/WeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4742,10 +4742,10 @@ function WeakAuras.StartProfile()
if (profileData.systems.time and profileData.systems.time.count == 1) then
prettyPrint(L["Profiling already started."]);
return;
else
prettyPrint(L["Profiling started."])
end

prettyPrint(L["Profiling started."])

profileData.systems = {};
profileData.auras = {};
profileData.systems.time = {};
Expand All @@ -4762,16 +4762,13 @@ local function doNothing()
end

function WeakAuras.StopProfile()
if (not profileData.systems.time or not profileData.systems.time.count == 1) then
if (not profileData.systems.time or profileData.systems.time.count ~= 1) then
prettyPrint(L["Profiling not running."]);
return;
elseif (profileData.systems.time.count == 1) then
profileData.systems.time.count = 0;
prettyPrint(L["Profiling stopped."])
else
prettyPrint(L["Profiling not running."]);
end

prettyPrint(L["Profiling stopped."])

profileData.systems.time.elapsed = debugprofilestop() - profileData.systems.time.start;
profileData.systems.time.count = 0;

Expand Down

0 comments on commit dbe4ef8

Please sign in to comment.