private static String formatSecondsToHMS(long seconds){
  if (null == mHourMinSecFormat) {
    mHourMinSecFormat=new SimpleDateFormat("HH:mm:ss");
    mHourMinSecFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
    mMinSecFormat=new SimpleDateFormat("mm:ss");
    mMinSecFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
  }
  if (seconds < 3600) {
    return mMinSecFormat.format(new Date(seconds * 1000));
  }
 else {
    return mHourMinSecFormat.format(new Date(seconds * 1000));
  }
}

private static String formatSecondsToHMS ( long seconds ) { if ( null == mHourMinSecFormat ) { mHourMinSecFormat = new SimpleDateFormat ( "HH:mm:ss" ) ; mHourMinSecFormat . setTimeZone ( TimeZone . getTimeZone ( "UTC" ) ) ; mMinSecFormat = new SimpleDateFormat ( "mm:ss" ) ; mMinSecFormat . setTimeZone ( TimeZone . getTimeZone ( "UTC" ) ) ; } if ( seconds < 3600 ) { return mMinSecFormat . format ( new Date ( seconds * 1000 ) ) ; } else { return mHourMinSecFormat . format ( new Date ( seconds * 1000 ) ) ; } }
format a time in seconds to a hh : mm : ss string .
