Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## sim.display
Class RateAdjuster

    java.lang.Object
      sim.display.RateAdjuster

All Implemented Interfaces:
  java.io.Serializable, Steppable

    public class RateAdjuster

extends java.lang.Object
implements Steppable

A simple class which maintains a frame rate fixed to no more than a given number of ticks per second. Typically this is used in games or visual demonstrations, where it is best to add it not to the Schedule but to the GUIState's minischedule. For example, you could do this when start() and load(...) are called:

`myGUIState.scheduleRepeatingImmediatelyAfter(new RateAdjuster(60)); // I want 60 frames per second maximum`

See Also:
  Serialized Form

Constructor Summary
`RateAdjuster(double targetRate)`

Method Summary
`void` | `step(SimState state)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RateAdjuster

    public RateAdjuster(double targetRate)

Method Detail

### step

    public void step(SimState state)

  Specified by:
    `step` in interface `Steppable`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD