All Packages Class Hierarchy This Package Previous Next Index
Class utils.timers.FixedKicker
java.lang.Object
|
+----java.lang.Thread
|
+----utils.timers.FixedKicker
- public class FixedKicker
- extends Thread
a Thread which throws equally sized timesteps at a Dynamic
object.
It tries to keep the realtime intervals between kicks constant,
and near a user defined level.
- See Also:
- Dynamic
-
dt
-
-
MIN_SLEEP
- the minimum amount of time that the thread will actually spend sleeping
per kick
-
FixedKicker(Dynamic, long)
-
-
pleaseStop()
-
the nice way to stop the thread.
-
run()
-
-
setSleepTime(long)
-
-
start()
-
MIN_SLEEP
public static final long MIN_SLEEP
- the minimum amount of time that the thread will actually spend sleeping
per kick
dt
public static double dt
FixedKicker
public FixedKicker(Dynamic d,
long s)
- Parameters:
- d - the @see Dynamic object to be kicked
- f - how much to scale the actul time(in ms) to get simulation time
- s - desired interval between hitting the top of the run loop
start
public void start()
- Overrides:
- start in class Thread
run
public void run()
- Overrides:
- run in class Thread
pleaseStop
public void pleaseStop()
- the nice way to stop the thread. i.e. the thread will drop out
of the run method. this prevents "IllegalThreadStateException"s
if the Dynamic object is used again
setSleepTime
public void setSleepTime(long new_sleep)
All Packages Class Hierarchy This Package Previous Next Index