|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTimer
public class Timer
An object in this class acts as a timer, indicating both how much time has elapsed from the time the object was created, and how much time remains until the end of a specified period. The time measured on most machines is CPU usage; when this is not supported, elapsed clock time is used instead.
Constructor Summary | |
---|---|
Timer(long max_time)
This constructor begins a timer which will run for a period specified by the max_time parameter. |
Method Summary | |
---|---|
long |
getTimeElapsed()
Returns the time (in milliseconds) that has elapsed since the creation of this object. |
long |
getTimeRemaining()
Returns the time (in milliseconds) that remains until the timer object reaches the end of the period specified at its creation. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timer(long max_time)
max_time
- timer duration in millisecondsMethod Detail |
---|
public long getTimeElapsed()
public long getTimeRemaining()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |