File tree Expand file tree Collapse file tree
src/main/java/cn/ussshenzhou/channel Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ mod_name=Channel
3030# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3131mod_license =GNU GPL 3.0
3232# The mod version. See https://semver.org/
33- mod_version =26.1.2-31 +beta
33+ mod_version =26.1.2-32 +beta
3434# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3535# This should match the base package used for the mod sources.
3636# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Original file line number Diff line number Diff line change 2525public class DebugManager {
2626 public static final int MEASURE_WINDOW_MS = 2000 ;
2727 public static final int LONG_MEASURE_WINDOW_MS = 5000 ;
28+ public static final IntervalCounter MIC_READ_COUNTER = new IntervalCounter (ChannelClientConfig .get ().frameLengthMs , MEASURE_WINDOW_MS );
2829 public static final IntervalCounter MIC_SEND_COUNTER = new IntervalCounter (ChannelClientConfig .get ().frameLengthMs , MEASURE_WINDOW_MS );
2930 public static final IntervalCounter PLAY_COUNTER = new IntervalCounter (10 , MEASURE_WINDOW_MS );
3031 public static final HashMap <UUID , IntervalCounter > RECEIVE_COUNTER = new HashMap <>();
@@ -45,6 +46,7 @@ public class DebugManager {
4546 }
4647
4748 public static void refresh () {
49+ MIC_READ_COUNTER .setIdealIntervalMs (ChannelClientConfig .get ().frameLengthMs );
4850 MIC_SEND_COUNTER .setIdealIntervalMs (ChannelClientConfig .get ().frameLengthMs );
4951 PLAY_COUNTER .reset ();
5052 RECEIVE_COUNTER .clear ();
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ public static synchronized void frameLengthChange() {
4747 }
4848
4949 private static synchronized void read () {
50+ DebugManager .MIC_READ_COUNTER .update ();
5051 if (Minecraft .getInstance ().getConnection () == null ||
5152 !CompatHelper .isClientLevelValid () ||
5253 MicrophoneHud .getStatus () == MicrophoneHud .Status .SUBSPACE ||
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public void tickT() {
4646
4747 Open Space Correction: %.3f
4848
49+ Reading Interval: %s
4950 Sending Interval: %s
5051 ICMP Ping: %s
5152 Playing Interval: %s
@@ -68,6 +69,7 @@ public void tickT() {
6869
6970 getOpenSpaceCorrection (),
7071
72+ DebugManager .MIC_READ_COUNTER .toString (),
7173 DebugManager .MIC_SEND_COUNTER .toString (),
7274 DebugManager .ICMP_PING .getStringAsMs (),
7375 DebugManager .PLAY_COUNTER .toString (),
You can’t perform that action at this time.
0 commit comments