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) DecimalFormat | |
(package private) long | |
(package private) long | |
(package private) JLabel | |
(package private) long | |
(package private) boolean | |
(package private) boolean | |
(package private) String |
Method Summary | |
long |
|
void |
|
void |
|
void |
|
void |
|
void |
|
(package private) long begin
(package private) DecimalFormat df
(package private) long end
(package private) long hold
(package private) JLabel myLabel
(package private) long pausetime
(package private) boolean set
(package private) boolean state
(package private) String t
public timer()
public timer(JLabel myLabel)
Constructor for TheTimer
- Parameters:
myLabel
- the label to display time
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 restart()
public void run()
writes the current time since start on the specified label
- See Also:
java.lang.Runnable.run()