2,875
edits
m (Use hundreds of a second instead of seconds for timespan conversion in attempts of better accuracy) |
m (Fix parameter naming) |
||
Line 210: | Line 210: | ||
-- @return (TimeSpan) A TimeSpan object containing the seconds, minutes, hours and days the input amount of action time amounts to. | -- @return (TimeSpan) A TimeSpan object containing the seconds, minutes, hours and days the input amount of action time amounts to. | ||
function p.actionTimeToTimeSpan(totalActionTime) | function p.actionTimeToTimeSpan(totalActionTime) | ||
local days = math.floor( | local days = math.floor(totalActionTime / 8640000) | ||
local remainder = | local remainder = totalActionTime % 8640000 | ||
local hours = math.floor(remainder / 360000) | local hours = math.floor(remainder / 360000) |
edits