Here you can find the source of formatTimestamp(long ts)
public static String formatTimestamp(long ts)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static String formatTimestamp(long ts) { return new SimpleDateFormat("HH:mm:ss.SSS", Locale.ROOT).format(new Date(ts)); }//w w w . j ava2s .co m }