Package ptolemy.util.test
Class WatchDog
- java.lang.Object
-
- ptolemy.util.test.WatchDog
-
public class WatchDog extends java.lang.ObjectThis class creates a Timer that calls System.exit() after a certain amount of time.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Christopher Hylands
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Field Summary
Fields Modifier and Type Field Description booleanwatchDogWentOffSet to true if the watch time timer interval has passed.
-
Constructor Summary
Constructors Constructor Description WatchDog(long timeToDie)Create a timer that will go off after timeToDie milliseconds.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancel the currently pending watchdog.voidsetExitOnTimeOut(boolean exitOnTimeOut)Determine whether the JVM will exit when the time interval has passed.
-
-
-
Method Detail
-
cancel
public void cancel()
Cancel the currently pending watchdog.
-
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.- Parameters:
exitOnTimeOut- True if the JVM will exit when the time interval has passed.
-
-