|
@@ -32,7 +32,7 @@ public class UploadUtils {
|
|
}
|
|
}
|
|
public static long getCurrentTime(){
|
|
public static long getCurrentTime(){
|
|
Calendar calendar = Calendar.getInstance();
|
|
Calendar calendar = Calendar.getInstance();
|
|
- calendar.set(Calendar.MILLISECOND, 0);
|
|
|
|
|
|
+
|
|
return calendar.getTimeInMillis();
|
|
return calendar.getTimeInMillis();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -46,7 +46,6 @@ public class UploadUtils {
|
|
public static long calculateDifferenceInSeconds(long timestamp1, long timestamp2) {
|
|
public static long calculateDifferenceInSeconds(long timestamp1, long timestamp2) {
|
|
// 计算两个时间戳之间的差异(毫秒)
|
|
// 计算两个时间戳之间的差异(毫秒)
|
|
long differenceInMillis = Math.abs(timestamp1 - timestamp2);
|
|
long differenceInMillis = Math.abs(timestamp1 - timestamp2);
|
|
-
|
|
|
|
// 将差异转换为秒
|
|
// 将差异转换为秒
|
|
return differenceInMillis / 1000;
|
|
return differenceInMillis / 1000;
|
|
}
|
|
}
|