public class Timer extends Object
Not very exact, measures user time, not processor time.
Constructor and Description |
---|
Timer()
Construct a new timer that starts immediately.
|
Modifier and Type | Method and Description |
---|---|
long |
diff()
Return the number of milliseconds the timer has been running.
|
void |
start()
Start the timer.
|
void |
stop()
Stop the timer.
|
String |
toString()
Return a string representation of the timer.
|
public void start()
public void stop()
public long diff()
(up till now, if it still runs, up to the stop time if it has been stopped)
Copyright © 1998–2020. All rights reserved.