Timer

public class Timer implements Tickable

Class Timer. Provides timer functionality for the Hytale server.

java.lang.Object > Timer

Field Summary

value

private double value

Field value.

minRestartValue

private double minRestartValue

Field minRestartValue.

maxValue

private double maxValue

Field maxValue.

rate

private double rate

Field rate.

repeating

private boolean repeating

Field repeating.

state

private TimerState state

Field state.

initialised

private boolean initialised

Field initialised.

offset

final double offset

Field offset.

Method Detail

Timer

public public Timer ()

Method Timer.

setRate

public void setRate (final double rate)

Method setRate.

Parameters:
final double rate

setMinRestartValue

public void setMinRestartValue (final double minRestartValue)

Method setMinRestartValue.

Parameters:
final double minRestartValue

setMaxValue

public void setMaxValue (final double maxValue)

Method setMaxValue.

Parameters:
final double maxValue

setValue

public void setValue (final double v)

Method setValue.

Parameters:
final double v

setRepeating

public void setRepeating (final boolean repeating)

Method setRepeating.

Parameters:
final boolean repeating

getValue

public double getValue ()

Method getValue.

isInitialised

public boolean isInitialised ()

Method isInitialised.

tick

public void tick (final float dt)

Method tick.

Parameters:
final float dt

start

public void start (final double minStartValue, final double maxStartValue, final double minRestartValue, final double maxValue, final double rate, final boolean repeating)

Method start.

Parameters:
final double minStartValue
final double maxStartValue
final double minRestartValue
final double maxValue
final double rate
final boolean repeating

resume

public void resume ()

Method resume.

pause

public void pause ()

Method pause.

addValue

public void addValue (final double v)

Method addValue.

Parameters:
final double v

stop

public void stop ()

Method stop.

restart

public void restart ()

Method restart.

isInState

public boolean isInState (final TimerState s)

Method isInState.

Parameters:
final TimerState s

isPaused

public boolean isPaused ()

Method isPaused.

isRunning

public boolean isRunning ()

Method isRunning.

isStopped

public boolean isStopped ()

Method isStopped.

pickNextTimerValue

private double pickNextTimerValue ()

Method pickNextTimerValue.

TimerAction

public private TimerAction (final String text)

Method TimerAction.

Parameters:
final String text

asText

public String asText ()

Method asText.

get

public String get ()

Method get.

TimerState

public private TimerState (final String text)

Method TimerState.

Parameters:
final String text