local function ResetTimer()
running,paused = false,false
Timer.Label.Text = "0.000"
current1 = 0
warn("reset")
end
function DisplayTimer()
local min = tostring(math.floor(current1/60))
local sec = tostring(math.floor(current1%60))
local mili = tostring(math.floor((current1%60)*100000))
mili = (#mili == 1 and ("00" .. mili) or #mili == 2 and ("0" .. mili) or mili)
Timer.Label.Text = (min..":"..sec .. "." .. mili)
end
function StartTimer(resetT)
ResetTimer()
running,paused = true,false
if (resetT) then
current1 = 0 begin = tick()
end
while (running) do
if (not paused) then
current1 = (tick()-begin)
DisplayTimer()
--warn(current1)
end
wait()
end
end
COMMUNITY QUESTION
Is there a way to start my timer again/ reset it? it does start
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.
