IntervalManager

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.ctdp.rfdynhud.valuemanagers
Class IntervalManager

    java.lang.Object
      net.ctdp.rfdynhud.valuemanagers.IntervalManager

All Implemented Interfaces:
  ManagedValue

    public class IntervalManager

extends java.lang.Object
implements ManagedValue

This manager invokes a method every defined time interval.

Author:
  Marvin Froehlich (CTDP)

Constructor Summary
`IntervalManager(FactoredIntProperty intervalProperty)`
`IntervalManager(long intervalNanos)`

Method Summary
`long` | `getInterval()`
`FactoredIntProperty` | `getProperty()`
`boolean` | `getState()` Gets the current interval state.
`boolean` | `getStateChanged()`
`void` | `init(long nanoTime)` Initializes/resets the `ManagedValue`.
`boolean` | `isUsed()`
`protected void` | `onIntervalHit(boolean state)` This method is invoked when the interval has been hit.
`void` | `reset()`
`void` | `update(long nanoTime)`
`void` | `update(long nanoTime, long frameCounter, boolean force)` Invokes the implementation specific update code.

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

Constructor Detail

### IntervalManager

    public IntervalManager(FactoredIntProperty intervalProperty)

### IntervalManager

    public IntervalManager(long intervalNanos)

Method Detail

### getInterval

    public final long getInterval()

### getProperty

    public final FactoredIntProperty getProperty()

### isUsed

    public final boolean isUsed()

### reset

    public void reset()

### init

    public void init(long nanoTime)

  Initializes/resets the `ManagedValue`.

  Specified by:
    `init` in interface `ManagedValue`
  Parameters:
    `nanoTime` - the starting time stamp

### getState

    public final boolean getState()

  Gets the current interval state.

  Returns:
    the current interval state.

### getStateChanged

    public final boolean getStateChanged()

### onIntervalHit

    protected void onIntervalHit(boolean state)

  This method is invoked when the interval has been hit.

  Parameters:
    `state` - the current state

### update

    public void update(long nanoTime,
                       long frameCounter,
                       boolean force)

  Invokes the implementation specific update code.

  Specified by:
    `update` in interface `ManagedValue`
  Parameters:
    `nanoTime` - the current timestamp in nano seconds
    `frameCounter` - the current frame index
    `force` - force clock to `true`.

### update

    public final void update(long nanoTime)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD