util.testsuite
Class WatchDog

java.lang.Object
  extended byutil.testsuite.WatchDog

public class WatchDog
extends java.lang.Object

This class creates a Timer that calls System.exit() after a certain amount of time.

Since:
Ptolemy II 2.2
Version:
$Id: WatchDog.java,v 1.10 2004/04/13 03:53:13 cxh Exp $
Author:
Christopher Hylands
Accepted Rating:
Red (cxh)
Proposed Rating:
Red (cxh)

Field Summary
 boolean watchDogWentOff
          Set to true if the watch time timer interval has passed.
 
Constructor Summary
WatchDog(long timeToDie)
          Create a timer that will go off after timeToDie milliseconds.
 
Method Summary
 void cancel()
           
 void setExitOnTimeOut(boolean exitOnTimeOut)
          Determine whether the JVM will exit when the time interval has passed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

watchDogWentOff

public boolean watchDogWentOff
Set to true if the watch time timer interval has passed. Used primarily for testing.

Constructor Detail

WatchDog

public WatchDog(long timeToDie)
Create a timer that will go off after timeToDie milliseconds.

Method Detail

cancel

public void cancel()

setExitOnTimeOut

public void setExitOnTimeOut(boolean exitOnTimeOut)
Determine whether the JVM will exit when the time interval has passed. This method is used for testing this class.