public final class Chronometer extends Object
Chronometer
permits to measure the time, with millisecond precision.Modifier and Type | Field and Description |
---|---|
protected Map |
marks |
protected Long |
stopTime |
Constructor and Description |
---|
Chronometer() |
Modifier and Type | Method and Description |
---|---|
long |
elapsedTime()
Return the elapsed time measured in milliseconds since the very start.
|
long |
elapsedTime(String mark)
Return the elapsed time measured in milliseconds since the specified mark was set.
|
static String |
formatElapsedTime(long millis) |
static void |
main(String[] arg)
Main function
|
void |
resume()
Resume the timer.
|
void |
start()
Start the timer.
|
void |
start(String mark)
Set a mark.
|
void |
stop()
Stop the timer.
|
public void start()
public void stop()
public void resume()
public void start(String mark)
public long elapsedTime()
public long elapsedTime(String mark)
public static String formatElapsedTime(long millis)
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.