Here you can find the source of format(int ticks)
public static String format(int ticks)
//package com.java2s; public class Main { private static final StringBuilder SB = new StringBuilder(11); public static String format(int ticks) { int hours = ticks / 216000; int minutes = ticks / 3600 % 60; int seconds = ticks / 60 % 60; int frames = ticks % 60; SB.setLength(0);/*from www .ja va2 s . co m*/ if (hours < 10) { SB.append('0'); } SB.append(hours); SB.append(':'); if (minutes < 10) { SB.append('0'); } SB.append(minutes); SB.append(':'); if (seconds < 10) { SB.append('0'); } SB.append(seconds); SB.append(':'); if (frames < 10) { SB.append('0'); } SB.append(frames); return SB.toString(); } }