|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibis.util.Timer
Utility for measuring time.
Method Summary | |
double |
accuracy()
Returns accuracy of this timer in seconds. |
void |
add(Timer t)
|
java.lang.String |
averageTime()
Returns the average measured time in microseconds, nicely formatted. |
double |
averageTimeVal()
Returns the average measured time in microseconds. |
static Timer |
createTimer()
Returns a Timer instance suitable for the system at hand. |
static Timer |
createTimer(java.lang.String impl)
Returns a Timer instance indicated by the implementation name provided. |
long |
currentTimeNanos()
Returns the current time stamp in nano seconds. |
static java.lang.String |
format(double micros)
Formats a time in microseconds |
java.lang.String |
implementationName()
Returns implementation name of this timer ("e.g., "javaTimer"). |
java.lang.String |
lastTime()
Returns the last measured time in microseconds, nicely formatted. |
double |
lastTimeVal()
Returns the last measured time in microseconds. |
int |
nrTimes()
Returns the number of measurements. |
void |
reset()
Resets the timer. |
void |
start()
Starts the timer. |
void |
stop()
Stops the timer. |
java.lang.String |
totalTime()
Returns the total measured time in microseconds, nicely formatted. |
double |
totalTimeVal()
Returns the total measured time in microseconds. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.String implementationName()
public void add(Timer t)
public double accuracy()
public long currentTimeNanos()
public void reset()
public double totalTimeVal()
public java.lang.String totalTime()
public double averageTimeVal()
public java.lang.String averageTime()
public double lastTimeVal()
public java.lang.String lastTime()
public int nrTimes()
public void start()
stop()
call will stop the timer and add the result to the
total.
public void stop()
start()
and "now" is
added to the total.
public static java.lang.String format(double micros)
micros
- the time to be formatted.
public static Timer createTimer(java.lang.String impl)
accuracy()
method.
impl
- the name of the Timer implementation.
public static Timer createTimer()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |