Class ThreadUtils

java.lang.Object
com.blackrook.gloop.openal.struct.ThreadUtils

public final class ThreadUtils extends Object
Simple threading utility functions.
Author:
Matthew Tropiano
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    sleep(long millis)
    Calls Thread.sleep() but in an encapsulated try to avoid catching InterruptedException.
    static void
    sleep(long millis, int nanos)
    Calls Thread.sleep() but in an encapsulated try to avoid catching InterruptedException.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadUtils

      public ThreadUtils()
  • Method Details

    • sleep

      public static void sleep(long millis)
      Calls Thread.sleep() but in an encapsulated try to avoid catching InterruptedException. Convenience method for making the current thread sleep when you don't care if it's interrupted or not and want to keep code neat.
      Parameters:
      millis - the amount of milliseconds to sleep.
      See Also:
    • sleep

      public static void sleep(long millis, int nanos)
      Calls Thread.sleep() but in an encapsulated try to avoid catching InterruptedException. Convenience method for making the current thread sleep when you don't care if it's interrupted or not and want to keep code neat.
      Parameters:
      millis - the amount of milliseconds to sleep.
      nanos - the amount of additional nanoseconds to sleep.
      See Also: