20 lines
480 B
Java
20 lines
480 B
Java
|
|
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));
|
||
|
|
}
|
||
|
|
}
|