public class Timer extends Object
Timer provides
stop-watch like behavior useful for timing the duration between events.| Constructor and Description |
|---|
Timer()
Create a new timer.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getDuration()
Gets the accumulated time elapsed, in milliseconds.
|
long |
getEndTime()
Gets the time at which the timer was stopped.
|
long |
getStartTime()
Gets the time at which the timer was last started.
|
void |
start()
Starts the timer.
|
void |
stop()
Stops the timer.
|
String |
toString() |
public Timer()
public void start()
start().public long getStartTime()
public long getDuration()
start().
If it is inactive, this is the amount of time which passed
between the start() and stop() calls.public long getEndTime()
Long.MIN_VALUE.public void stop()
stop() and the previous call to start().Copyright © 2019 Actian Corporation. All rights reserved.