Class SleepingThread
Class SleepingThread
java.lang.Object
|
+----java.lang.Thread
|
+----SleepingThread
- class SleepingThread
- extends Thread
A thread skeleton that implements a variable and a method that
allows setting a internal sleeping interval.
Written: Radu Sion
Version: 0.17
Source: SleepingThread.java
- See Also:
- dbg
-
DEFAULT_SLEEP
-
-
getSleep()
- Returns the internal sleep delay.
-
mysleep(long)
- Implements a sort of sleep that does NOT throw any exception.
-
pause()
- Makes a pause according to the internal sleep.
-
pause(float)
- Makes a pause according to the internal sleep multiplied
to the adjust parameter.
-
setSleep(long)
- Sets the internal sleep delay, used when appealing .pause()
If invalid value then the sleep delay remains unchanged.
DEFAULT_SLEEP
public final static long DEFAULT_SLEEP
setSleep
public void setSleep(long sleep)
- Sets the internal sleep delay, used when appealing .pause()
If invalid value then the sleep delay remains unchanged.
It is internally synchronized !!!
- Parameters:
- sleep - New internal sleep delay to use
getSleep
public synchronized long getSleep()
- Returns the internal sleep delay.
pause
public void pause()
- Makes a pause according to the internal sleep.
mysleep
public void mysleep(long sleep)
- Implements a sort of sleep that does NOT throw any exception.
- Parameters:
- sleep - Number of ms to sleep
pause
public void pause(float adjust)
- Makes a pause according to the internal sleep multiplied
to the adjust parameter.
- Parameters:
- adjust - Adjusting sleep delay factor