us.ihmc.utilities
Class ThreadTools

java.lang.Object
  extended by us.ihmc.utilities.ThreadTools

public class ThreadTools
extends java.lang.Object


Field Summary
static int REASONABLE_WAITING_SLEEP_DURATION_MS
           
 
Constructor Summary
ThreadTools()
           
 
Method Summary
static java.util.concurrent.ThreadFactory getNamedThreadFactory(java.lang.String name)
           
static java.lang.Process runCommand(java.lang.String command, java.io.PrintStream outputStream, java.io.PrintStream errorStream)
           
static void sleep(long milliseconds)
           
static void sleepForever()
           
static void sleepSeconds(double secondsToSleep)
           
static void startAsDaemon(java.lang.Runnable daemonThreadRunnable)
           
static void waitUntil(long endTime)
           
static void waitUntilNextMultipleOf(long waitMultipleMS)
           
static void waitUntilNextMultipleOf(long waitMultipleMS, long moduloOffset)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REASONABLE_WAITING_SLEEP_DURATION_MS

public static final int REASONABLE_WAITING_SLEEP_DURATION_MS
See Also:
Constant Field Values
Constructor Detail

ThreadTools

public ThreadTools()
Method Detail

sleepSeconds

public static void sleepSeconds(double secondsToSleep)

sleep

public static void sleep(long milliseconds)

sleepForever

public static void sleepForever()

runCommand

public static java.lang.Process runCommand(java.lang.String command,
                                           java.io.PrintStream outputStream,
                                           java.io.PrintStream errorStream)

startAsDaemon

public static void startAsDaemon(java.lang.Runnable daemonThreadRunnable)

waitUntilNextMultipleOf

public static void waitUntilNextMultipleOf(long waitMultipleMS)
                                    throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

waitUntilNextMultipleOf

public static void waitUntilNextMultipleOf(long waitMultipleMS,
                                           long moduloOffset)
                                    throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

waitUntil

public static void waitUntil(long endTime)
                      throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

getNamedThreadFactory

public static java.util.concurrent.ThreadFactory getNamedThreadFactory(java.lang.String name)