Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
Thread
timer
public class timer
extends Thread
Field Summary | |
(package private) long | |
(package private) draw2 | |
(package private) DecimalFormat | |
(package private) long | |
(package private) JLabel | |
(package private) boolean | |
(package private) boolean | |
(package private) String |
Method Summary | |
long |
|
void |
|
void |
|
void |
|
void |
|
(package private) long begin
(package private) DecimalFormat df
(package private) long end
(package private) JLabel myLabel
(package private) boolean set
(package private) boolean state
(package private) String t
public timer(JLabel myLabel, draw2 d)
Constructor for Timer
- Parameters:
myLabel
- the label to display timed
- the reference of a draw object
public long getTime()
gives back the time in milliseconds
- Returns:
- long the time in milliseconds
public void go()
starts the timer
public void hold()
stop the timer
public void reset()
resets the timer
public void run()
writes the current time since start on the specified label
- See Also:
java.lang.Runnable.run()