Here you can find the source of getTime(long millis)
public static String getTime(long millis)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class Main { static DateFormat formattor = new SimpleDateFormat("HH:mm:ss"); public static String getTime(long millis) { return formattor.format(new Date(millis)); }/*from w w w . j a v a 2 s . c o m*/ }