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

## lejos.util
Class Timer

    java.lang.Object
      lejos.util.Timer

    public class Timer

extends Object

Timer object, with some similar functionality to java.Swing.Timer.

Author:
  Ryan VanderBijl

Constructor Summary
`Timer(int theDelay, TimerListener el)` Create a Timer object.

Method Summary
`int` | `getDelay()` access how man milliseconds between timedOut() messages.
`void` | `setDelay(int newDelay)` Change the delay between timedOut messages.
`void` | `start()` Starts the timer, telling it to send timeOut() methods to the TimerListener.
`void` | `stop()` Stops the timer.

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

Constructor Detail

### Timer

    public Timer(int theDelay,
                 TimerListener el)

  Create a Timer object. Every theDelay milliseconds the el.timedOut() function is called. You may change the delay with setDelay(int). You need to call start() explicitly.

Method Detail

### getDelay

    public int getDelay()

  access how man milliseconds between timedOut() messages.

### setDelay

    public void setDelay(int newDelay)

  Change the delay between timedOut messages. Safe to call while start()ed. Time in milli-seconds.

### stop

    public void stop()

  Stops the timer. timedOut() messages are not sent.

### start

    public void start()

  Starts the timer, telling it to send timeOut() methods to the TimerListener.

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