修复心跳异常,支持通道列表,推流列表,拉流代理列表直接查看对应的云端录像,兼容大于INT的ssrc的格式化
This commit is contained in:
5
src/main/java/com/genersoft/iot/vmp/utils/DateUtil.java
Normal file → Executable file
5
src/main/java/com/genersoft/iot/vmp/utils/DateUtil.java
Normal file → Executable file
@@ -1,6 +1,8 @@
|
||||
package com.genersoft.iot.vmp.utils;
|
||||
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -109,6 +111,9 @@ public class DateUtil {
|
||||
}
|
||||
|
||||
public static long getDifferenceForNow(String keepaliveTime) {
|
||||
if (ObjectUtils.isEmpty(keepaliveTime)) {
|
||||
return 0;
|
||||
}
|
||||
Instant beforeInstant = Instant.from(formatter.parse(keepaliveTime));
|
||||
return ChronoUnit.MILLIS.between(beforeInstant, Instant.now());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user