code: public String getDuration(Locale locale) {
          long durationL = (long)durationSeconds;
  
          // Output as Hours / Minutes / Seconds / Parts
          long hours = TimeUnit.SECONDS.toHours(durationL);
          long mins = TimeUnit.SECONDS.toMinutes(durationL) - (hours*60);
          double secs = durationSeconds - (((hours*60)+mins)*60);
  
          return String.format(locale, "%02d:%02d:%05.2f", hours, mins, secs);
      }
docs: Returns the duration, in Hours:Minutes:Seconds.MS
  or Hours:Minutes:Seconds,MS (depending on Locale)