public class CPUTimeStopWatch extends Object
This stopwatch needs a VM which supports getting CPU Time information for the current thread. The static method createInstance() will take care to return only a new instance of this class if the VM is capable of returning CPU time.
Constructor and Description |
---|
CPUTimeStopWatch() |
Modifier and Type | Method and Description |
---|---|
static CPUTimeStopWatch |
createInstance()
use this method instead of the constructor to be sure that the underlying
VM provides all features needed by this class.
|
long |
readout()
Return the elapsed CPU time in nanoseconds.
|
void |
start()
Starts the stopwatch.
|
long |
stop()
Stops the stopwatch and return the elapsed CPU time in nanoseconds.
|
public static CPUTimeStopWatch createInstance()
CPUTimeStopWatch()
or
null
if the VM does not support getting CPU time
informationpublic void start()
public long stop()
public long readout()
stop()
the stopwatch will continue to run after this call.Copyright © 2017 Eclipse JGit Project. All rights reserved.