All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class merlin.util.Timer

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----merlin.util.Timer

public class Timer
extends Thread
The representation of a Timer. A timer runs in the background. The object given at creation is timed out after a certain time. This is done by calling its timedOut-method

Version:
1.0
Author:
Stefan Hellkvist

Constructor Index

 o Timer(TimeOutable, long)
Class constructor.

Method Index

 o kill()
The timer is no longer wanted and is killed.
 o restart(long)
The timer is restarted
 o run()
The timer waits the time and then calls the objects timedOut-function

Constructors

 o Timer
 public Timer(TimeOutable to,
              long time)
Class constructor.

Methods

 o run
 public void run()
The timer waits the time and then calls the objects timedOut-function

Overrides:
run in class Thread
 o kill
 public void kill()
The timer is no longer wanted and is killed.

 o restart
 public void restart(long time)
The timer is restarted

Parameters:
time - The new time to wait

All Packages  Class Hierarchy  This Package  Previous  Next  Index