public static String milliSecToString(long mS){
  long rem_mS=(long)(mS % 1000.0);
  long rem_sec=(long)((mS / 1000.0) % 60.0);
  long rem_min=(long)((mS / 60000.0) % 60.0);
  long hr=(long)(mS / 3600000.0);
  String mSstr=zeroPad(Long.toString(rem_mS),3);
  String secStr=zeroPad(Long.toString(rem_sec),2);
  String minStr=zeroPad(Long.toString(rem_min),2);
  return String.format("%d:%2s:%2s.%3s",hr,minStr,secStr,mSstr);
}

public static String milliSecToString ( long mS ) { long rem_mS = ( long ) ( mS % 1000.0 ) ; long rem_sec = ( long ) ( ( mS / 1000.0 ) % 60.0 ) ; long rem_min = ( long ) ( ( mS / 60000.0 ) % 60.0 ) ; long hr = ( long ) ( mS / 3600000.0 ) ; String mSstr = zeroPad ( Long . toString ( rem_mS ) , 3 ) ; String secStr = zeroPad ( Long . toString ( rem_sec ) , 2 ) ; String minStr = zeroPad ( Long . toString ( rem_min ) , 2 ) ; return String . format ( "%d:%2s:%2s.%3s" , hr , minStr , secStr , mSstr ) ; }
returns the given time in milliseconds formatted as hours : min : sec . msec
