patterntesting.runtime.util
Class ThreadUtil

Package class diagram package ThreadUtil
java.lang.Object
  extended by patterntesting.runtime.util.ThreadUtil

public final class ThreadUtil
extends Object

The Class ThreadUtil.

Since:
30.09.2008
Version:
$Revision: 1.6 $
Author:
oliver

Method Summary
static long getTimerResolutionInMillis()
          Gets the timer resolution in millis.
static void sleep()
          Sleep.
static void sleep(int time, 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,
                         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


Copyright © 2002–2014 PatternTesting Team. All rights reserved.