Add new code snippets

This commit is contained in:
2024-03-03 13:50:12 +01:00
commit 01b612a50b
409 changed files with 65292 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
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