Seconds to Milliseconds

Aquí puedes preguntar o compartir tus dudas y conocimientos acerca del programa
hi all,
function AB(sSeconds)
	local nSeconds = String.ToNumber(sSeconds)
	if nSeconds == 0 then
		
		return "00:00.00";
	else
		local nMins = string.format("%02.f", Math.Floor(nSeconds/60));
		local nSecs = string.format("%02.f", Math.Floor(nSeconds - nMins *60));
		local nMilliSec = string.format("%02.f", Math.Floor(nSeconds - (nMins *60000) - (nSecs *1000)));
		return nMins..":"..nSecs.."."..nMilliSec
	end
end
how to convert seconds to milliseconds in functions AB ?
for example :
01:03.45 --- 01:03.99 = 01:04.00
thanks advance

By the title of your post.

1 seconds are 1000 milliseconds

Código: Seleccionar todo

millis=s*1000
LOL

Venia a decir lo mismo jajaja

:) I did not ask for this for example

1 seconds == 1000 milliseconds ===>>> 1 seconds = 100 milliseconds
00:00.00 ==>> 00:00.100 ==>> 00:01.00


function time_to_millis(min,sec,mil)
      return (((min*60)*1000)+(sec*1000))+mil;
end

function millis_to_time(millis)
       local retm=0;
       local rets=0;
       while(millis>(60*1000)-1) 
              millis=millis-(60*1000);
              retm=retm+1;
       end
       while(mills>999)
              millis=millis-1000;
              rets=rets+1;
       end
       return retm,rets,millis
end

example
time_to_millis(0,1,12)=1012
millis_to_time(2500)=0,2,500