Here you can find the source of TimeToString(int ticks)
public static String TimeToString(int ticks)
//package com.java2s; //License from project: LGPL import java.util.concurrent.TimeUnit; public class Main { public static String TimeToString(int ticks) { int millis = ticks / 20 * 1000; return String.format("%02d:%02d:%02d", TimeUnit.MILLISECONDS.toHours(millis), TimeUnit.MILLISECONDS.toMinutes(millis) % TimeUnit.HOURS.toMinutes(1), TimeUnit.MILLISECONDS.toSeconds(millis) % TimeUnit.MINUTES.toSeconds(1)); }//from w w w . j a va 2s. co m }