Class ThreadUtil


  • public final class ThreadUtil
    extends java.lang.Object
    The Class ThreadUtil.
    Since:
    30.09.2008
    Version:
    $Revision: 1.12 $
    Author:
    oliver
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long getTimerResolutionInMillis()
      Gets the timer resolution in millis.
      static void sleep()
      Sleep.
      static void sleep​(int time, java.util.concurrent.TimeUnit unit)
      Using now also the constants MINUTES, HOURS and DAYS which are new with Java 6.
      static void sleep​(long millis)
      Sleep.
      static void sleep​(long millis, int nanos)
      Sleep.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • sleep

        public static void sleep()
        Sleep.
      • sleep

        public static void sleep​(long millis)
        Sleep.
        Parameters:
        millis - the millis
      • sleep

        public static void sleep​(long millis,
                                 int nanos)
        Sleep.
        Parameters:
        millis - the millis
        nanos - the nanos
      • sleep

        public static void sleep​(int time,
                                 java.util.concurrent.TimeUnit unit)
        Using now also the constants MINUTES, HOURS and DAYS which are new with Java 6.
        Parameters:
        time - e.g. 5
        unit - e.c. SECONDS
      • getTimerResolutionInMillis

        public static long getTimerResolutionInMillis()
        Gets the timer resolution in millis.
        Returns:
        the timer resolution in millis