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

Variable Index

 o DEFAULT_SLEEP

Method Index

 o getSleep()
Returns the internal sleep delay.
 o mysleep(long)
Implements a sort of sleep that does NOT throw any exception.
 o pause()
Makes a pause according to the internal sleep.
 o pause(float)
Makes a pause according to the internal sleep multiplied to the adjust parameter.
 o setSleep(long)
Sets the internal sleep delay, used when appealing .pause() If invalid value then the sleep delay remains unchanged.

Variables

 o DEFAULT_SLEEP
  public final static long DEFAULT_SLEEP

Methods

 o 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
 o getSleep
  public synchronized long getSleep()
Returns the internal sleep delay.
 o pause
  public void pause()
Makes a pause according to the internal sleep.
 o mysleep
  public void mysleep(long sleep)
Implements a sort of sleep that does NOT throw any exception.
Parameters:
sleep - Number of ms to sleep
 o 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