public class StopWatch extends Object
System.nanoTime()
. It compensates glitches in
System.nanoTime()
, such that the stop time can never be earlier than
the start time. (For example, see
stackoverflow)Modifier and Type | Method and Description |
---|---|
static StopWatch |
createAndStart()
Construct and start a new
StopWatch . |
static StopWatch |
createStopped()
Construct new
StopWatch . |
long |
nanoTime()
Get the total time the clock was running, in nano-seconds.
|
double |
seconds()
Get the total time the clock was running in seconds.
|
static String |
secondsToString(double seconds) |
void |
start()
Start the clock.
|
void |
stop()
Stop the clock.
|
String |
toString()
Get the total time the clock was running as string.
|
public static StopWatch createStopped()
public void start()
public void stop()
public long nanoTime()
public double seconds()
public String toString()
public static String secondsToString(double seconds)
Copyright © 2015–2022 ImgLib2. All rights reserved.