static volatile bool sleep_noSleep; static void sleep(long ms) { ping(); if (ms < 0) ret; // allow spin locks if (isAWTThread() && ms > 100) fail("Should not sleep on AWT thread"); try { Thread.sleep(ms); } catch (Exception e) { throw new RuntimeException(e); } } static void sleep() ctex { if (sleep_noSleep) fail("nosleep"); print("Sleeping."); sleepQuietly(); }