📜  秒到时间 roblox - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:30.248000             🧑  作者: Mango

代码示例1
function Format(Int)
    return string.format("%02i", Int)
end

function convertToHMS(Seconds)
    local Minutes = (Seconds - Seconds%60)/60
    Seconds = Seconds - Minutes*60
    local Hours = (Minutes - Minutes%60)/60
    Minutes = Minutes - Hours*60
    return Format(Hours)..":"..Format(Minutes)..":"..Format(Seconds)
end