diff --git a/Stopwatch.lua b/Stopwatch.lua index cbe28c9..a8ee3f1 100644 --- a/Stopwatch.lua +++ b/Stopwatch.lua @@ -77,7 +77,7 @@ function Stopwatch:getTime() timeDifference = self.stopTime - self.startTime; --If start has been called but stop hasn't make the current time the end time. This simulates looking at a stopwatch while it is still running elseif((self.startTime ~= nil) and (self.stopTime == nil)) then - timeDifference = os.time() - self.startTime; + timeDifference = os.clock() - self.startTime; --Otherwise return -1 as an error else timeDifference = -1; @@ -183,7 +183,7 @@ function Stopwatch:getString() elseif(timeResoltuion == Stopwatch.timeResolution.hours) then timeString = string.format("%.3f hours", timeDifference); else - timeString = "ERROR!"; + timeString = "ERROR! TimeResolution = " .. timeResolution; end --Return the string