spiceJ/core/src/main/java/at/borkowski/spicej/impl/SleepWakeup.java
public static void sleep(int ms) {
      long deadline = System.currentTimeMillis() + ms;
      while (System.currentTimeMillis() < deadline) {
         try {
            Thread.sleep(Math.max(1, (deadline - System.currentTimeMillis()) / 2));
         } catch (InterruptedException ignore) {}
      }
   }
public static void sleep(int ms) {
      long deadline = System.currentTimeMillis() + ms;
      while (System.currentTimeMillis() < deadline) {
         try {
            Thread.sleep(Math.max(1, (deadline - System.currentTimeMillis()) / 2));
         } catch (InterruptedException ignore) {}
      }
   }
Sleeps for the provided amount of milliseconds, ignoring thread
interrupts.

@param ms
how many milliseconds to sleep