long endTime = 6665002L;
long duration = endTime%1000; //取余
Long second = endTime/1000%60; //秒
//long minute = endTime/1000/60%60; //分 51分5秒2毫秒
long minute = endTime/1000/60; //分 111分5秒2毫秒
System.out.println(minute+"分"+second+"秒"+duration+"毫秒"); //111分5秒2毫秒
String seconds = "";
if(second/10==0){ //表示小于10相当于个位数
seconds = "0"+second;
}else{
seconds = second+"";
}
System.out.println(minute+"分"+seconds+"秒"+duration+"毫秒"); //111分05秒2毫秒