File tree Expand file tree Collapse file tree
src/main/java/net/raphimc/noteblocklib/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 */
1818package net .raphimc .noteblocklib .util ;
1919
20+ import java .util .Locale ;
21+
2022public class TimerHack {
2123
2224 /**
2325 * Set this to false (Before using the NoteBlockLib API) to disable the timer hack (Useful if you have your own way of enabling high resolution timers)
2426 */
25- public static boolean ENABLED = true ;
27+ public static boolean ENABLED = System . getProperty ( "os.name" ). toLowerCase ( Locale . ROOT ). startsWith ( "windows" ) ;
2628 private static Thread THREAD ;
2729
2830 /**
@@ -33,7 +35,7 @@ public static synchronized void ensureRunning() {
3335 THREAD = new Thread (() -> {
3436 while (true ) {
3537 try {
36- Thread .sleep (Integer .MAX_VALUE );
38+ Thread .sleep (Long .MAX_VALUE );
3739 } catch (InterruptedException ignored ) {
3840 }
3941 }
You can’t perform that action at this time.
0 commit comments