public class AppTimer extends Timers
Modifier and Type | Field and Description |
---|---|
protected boolean |
isTimerRunning |
Modifier and Type | Method and Description |
---|---|
java.util.Timer |
getCurrentTimer() |
int |
getCurrentTimerStartLength() |
static AppTimer |
getInstance() |
long |
getStartTime() |
void |
pause()
Pauses the current timer state.
|
void |
restart()
Resets the timer back to beginning value and starts it again
|
void |
setTimeAtPause(long timeAtPause) |
void |
start()
Starts the timer (initial or after a pause), is one is not already running (i.e.,
isTimerRunning is false). |
void |
stop()
Completely stops and cancels the timer.
|
convertFromMinuteFormat, convertToMinuteFormat, get, getInitialTimerLength, set, setInitialTimerLength, setInitialTimerTwoLength
public java.util.Timer getCurrentTimer()
public long getStartTime()
public int getCurrentTimerStartLength()
public void setTimeAtPause(long timeAtPause)
public static AppTimer getInstance()
public void start() throws java.io.IOException, java.util.NoSuchElementException, InvalidDataException
isTimerRunning
is false).
Sets the value of startTime
to be either:
Sets the value of isTimerRunning
to true before starting the
java.io.IOException
java.util.NoSuchElementException
InvalidDataException
stop()
,
pause()
,
restart()
public void stop() throws java.lang.NullPointerException, java.io.IOException
public void pause()
public void restart() throws java.io.IOException, InvalidDataException
java.io.IOException
InvalidDataException
start()
,
stop()
,
pause()