mirror of
https://bitbucket.org/Mattrixwv/luaclasses.git
synced 2025-12-06 18:33:59 -05:00
Fixed problem where minute and hour weren't
returning the correct value
This commit is contained in:
@@ -117,17 +117,7 @@ function Stopwatch:getMinutes()
|
||||
local timeDifference = self:getTime(); --Get the time that has elapsed
|
||||
--If you did not get an error convert the time to minutes
|
||||
if(timeDifference >= 0) then
|
||||
timerDifference = timeDifference / 60;
|
||||
end
|
||||
return timeDifference;
|
||||
end
|
||||
|
||||
--This function returns the duration the stopwatch has run in hours
|
||||
function Stopwatch:getHours()
|
||||
local timeDifference = self:getTime(); --Get the time that has elapsed
|
||||
--If you did not get an error convert the time to minutes
|
||||
if(timeDifference >= 0) then
|
||||
timerDifference = timeDifference / 3600;
|
||||
timeDifference = timeDifference / 60;
|
||||
end
|
||||
return timeDifference;
|
||||
end
|
||||
@@ -142,6 +132,16 @@ function Stopwatch:getMinutes()
|
||||
return timeDifference;
|
||||
end
|
||||
|
||||
--This function returns the duration the stopwatch has run in hours
|
||||
function Stopwatch:getHours()
|
||||
local timeDifference = self:getTime(); --Get the time that has elapsed
|
||||
--If you did not get an error convert the time to minutes
|
||||
if(timeDifference >= 0) then
|
||||
timeDifference = timeDifference / 3600;
|
||||
end
|
||||
return timeDifference;
|
||||
end
|
||||
|
||||
function Stopwatch:getString()
|
||||
local timeDifference = self:getTime(); --Get the time that has elapsed
|
||||
local timeResolution = Stopwatch.timeResolution.seconds;
|
||||
|
||||
Reference in New Issue
Block a user