public interface TesTimesInterface
System.nanoTime() to measure the teat time of an operation.
Before the operation is started, you can obtain the start time:
startTime = System.nanoTime().
After the operation is completed, you can obtain the end time:
endTime = System.nanoTime().
Test Time is then:
testTime = endTime - startTime.
| Modifier and Type | Method and Description |
|---|---|
void |
addTestTime(long testTime)
This method is used to add a test time.
|
double |
getAverageTestTime()
This method is used to obtain the average test time.
|
long |
getLastTestTime()
This method is used to retrieve the last test time.
|
long[] |
getTestTimes()
This method returns an array of long values representing the last 10 test times.
|
void |
resetTestTimes()
This method is used to reset all 10 linear search times to zero.
|
long getLastTestTime()
long[] getTestTimes()
void resetTestTimes()
void addTestTime(long testTime)
testTime - a long value representing the test time in nanoseconds.double getAverageTestTime()