public static String formatDuration(Duration duration) {
        long seconds = duration.getSeconds();
        long absSeconds = Math.abs(seconds);
        String positive = String.format(Locale.ENGLISH,
                "%d:%02d:%02d", absSeconds / 3600, (absSeconds % 3600) / 60, absSeconds % 60);
        return seconds < 0 ? "-" + positive : positive;
    }
Created by Nick@NewStand.org on 2017/3/26 17:00
E-Mail: NewStand@163.com
All right reserved.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/util/DateUtils.java