12 lines
270 B
Lua
12 lines
270 B
Lua
local function formatTime(time)
|
|
local res, m, s = time, 0, 0
|
|
while res >= 60 do
|
|
m = m + 1
|
|
res = res - 60
|
|
end
|
|
s = res
|
|
if s < 10 then s = string.format("0%d", s) end
|
|
if type(s) ~= "string" then tostring(s) end
|
|
return string.format("%d:%s", m, s)
|
|
end
|