viewtopic.php?f=3&t=2683
No es exactamente lo que buscas pero puedes adaptarlo, hace tiempo lo hice para otro usuario
seconds = ("00");
minutes = ("00");
hours = ("00");
if(tonumber(seconds) < 9)then
seconds = ("0"..seconds + 1);
else
seconds = (String.TrimLeft(seconds, "0") + 1);
end
if(seconds == 60)then
if(tonumber(minutes) < 9)then
minutes = ("0"..minutes + 1);
else
minutes = (String.TrimLeft(minutes, "0") + 1);
end
seconds = ("00");
end
if(minutes == 60)then
if(tonumber(hours) < 9)then
hours = ("0"..hours + 1);
else
hours = (String.TrimLeft(hours, "0") + 1);
end
seconds = ("00");
minutes = ("00");
end
if(tonumber(hours) == 23)then
if(tonumber(minutes) == 59)then
if(seconds == 59)then
seconds = ("00");
minutes = ("00");
hours = ("00");
end
end
end
Label.SetText("Label1", "Time: "..hours..":"..minutes..":"..seconds);