Java如何格式化显示消耗时间
//消耗时间
long s = 60 * 60 * 24 + 3000 + 200;
final String format = String.format("%d:%02d:%02d", s / 3600, (s % 3600) / 60, (s % 60));
System.out.println(format);
// 持续了 24:53:20
Loading...
//消耗时间
long s = 60 * 60 * 24 + 3000 + 200;
final String format = String.format("%d:%02d:%02d", s / 3600, (s % 3600) / 60, (s % 60));
System.out.println(format);
// 持续了 24:53:20