I have this code that calculates in 1 second in 1 second between a certain time and then insert into a table. Instead of calculating every 1 second, how can I calculate, for example, every 5 seconds?
for y = horaInicial, horaFinal-1 do
hora = tostring(math.floor(y / (3600)))
minuto = tostring(math.floor((y - hora * (3600)) / (60)))
segundo = tostring(math.floor(y - hora * (3600) - minuto * (60)))
end