// 밀리초를 시간으로 표시 (hh:mi:ss)
function DisplayTime(nMSec)
{
     var nTotalSec = parseInt(nMSec / 1000); 

     var nTotalMin = parseInt(nTotalSec / 60); 
     var nHour = parseInt(nTotalMin / 60);
     var nMin = nTotalMin % 60;
     var nSec = nTotalSec % 60; 

     return ( (nHour < 10) ? "0" : "" ) + nHour + ":" + ( (nMin < 10) ? "0" : "" ) + nMin + ":" + ( (nSec < 10) ? "0" : "" ) + nSec;
}
반응형

+ Recent posts