20 lines
480 B
Java
Raw Normal View History

2023-08-01 15:33:17 +08:00
package com.zhgd.xmgl.util;
import io.swagger.models.auth.In;
public class TimeUtil {
public static String toHourMinSecond(Integer second) {
if (second == null) {
return null;
}
int h = second / 3600;
int min = (second % 3600) / 60;
int s = (second % 3600) % 60;
return h + "h" + min + "min" + s + "s";
}
public static void main(String[] args) {
System.out.println(toHourMinSecond(3601));
}
}