public final class Timer extends Object
| Constructor and Description |
|---|
Timer()
Create a new timer.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getTime()
Get the currently accumulated time.
|
TimeSpan |
getTimeSpan()
Get the accumulated time as a time span object.
|
boolean |
reset()
Reset the timer to 0.
|
boolean |
start()
(Re)start the timer.
|
boolean |
stop()
Stop the timer.
|
public Timer()
start() explicitly.public boolean start()
false iff the timer is already running.public boolean stop()
false iff the timer is not running.public boolean reset()
false iff the timer is currently running.public long getTime()
Copyright © 2018. All rights reserved.