public static const SEC_PER_MINUTE:int = 60;
  public static const SEC_PER_HOUR:int = 3600;
  public static const MINUTE_PER_HOUR:int = 60;
  public static const SEC_PER_DAY:int = 86400;

  var input:Number = item.sysUptime;

     var day:int;
     var hour:int;
     var min:int;
     var temp:int;
     
     day = input / Constants.SEC_PER_DAY;
     hour = input % Constants.SEC_PER_DAY / Constants.SEC_PER_HOUR;
     min = input % Constants.SEC_PER_HOUR / Constants.SEC_PER_MINUTE; //시간단위로 나눌 수 없는 나머지 초는 분 단위로 표시 가능
     if(day > 0) {
      sysUptime =day + "일 " + hour + "시 " + min + "분";
     } else if(hour > 0) {
      sysUptime = hour + "시 " + min + "분";
     } else {
      sysUptime = min + "분";
     }

 

Posted by 미랭군