diff --git a/Stopwatch.lua b/Stopwatch.lua index a8ee3f1..49031bf 100644 --- a/Stopwatch.lua +++ b/Stopwatch.lua @@ -56,9 +56,9 @@ function Stopwatch:stop() --Set the time first, for efficiency sake self.stopTime = os.clock(); --Make sure the clock had been started - if(startTime == nil) then + if(self.startTime == nil) then --If not unset the stop time - stopTime = nil; + self.stopTime = nil; end end @@ -180,7 +180,7 @@ function Stopwatch:getString() timeString = string.format("%.3f seconds", timeDifference); elseif(timeResolution == Stopwatch.timeResolution.minutes) then timeString = string.format("%.3f minutes", timeDifference); - elseif(timeResoltuion == Stopwatch.timeResolution.hours) then + elseif(timeResolution == Stopwatch.timeResolution.hours) then timeString = string.format("%.3f hours", timeDifference); else timeString = "ERROR! TimeResolution = " .. timeResolution;