package com.hainaos.vc.utils;

public class TimeUtils {

    public static String TimeFormat(long millisecond) {
        int ss = 1000;
        int mi = ss * 60;
        int hh = mi * 60;

        long hour = (millisecond) / hh;
        long minute = (millisecond - hour * hh) / mi;
        long second = (millisecond - hour * hh - minute * mi) / ss;

        String strHour = hour < 10 ? "0" + hour : "" + hour;
        String strMinute = minute < 10 ? "0" + minute : "" + minute;
        String strSecond = second < 10 ? "0" + second : "" + second;
        if (hour > 0) {
            return strHour + ":" + strMinute + ":" + strSecond;
        } else {
            return strMinute + ":" + strSecond;
        }
    }

}
