1 parent 35d06c1 commit 7f02d69Copy full SHA for 7f02d69
1 file changed
src/main/java/cn/ussshenzhou/channel/audio/DebugManager.java
@@ -51,13 +51,13 @@ public static void refresh() {
51
}
52
53
public static void sending(byte[] opus) {
54
- OPUS_SEND_CACHE.put(Arrays.hashCode(opus), Util.getMillis());
+ OPUS_SEND_CACHE.put(Arrays.hashCode(opus), Util.getNanos());
55
56
57
public static void receiving(byte[] opus) {
58
var hashcode = Arrays.hashCode(opus);
59
if (OPUS_SEND_CACHE.containsKey(hashcode)) {
60
- RELAY_PING.put((int) (Util.getMillis() - OPUS_SEND_CACHE.get(hashcode)) * 1000);
+ RELAY_PING.put((int) (Util.getNanos() - OPUS_SEND_CACHE.get(hashcode)) / 1000);
61
OPUS_SEND_CACHE.remove(hashcode);
62
63
if (OPUS_SEND_CACHE.size() > 500) {
0 commit comments