public interface TestTimesInterface
This interface will be used to organize and manage test times that are measured for specific operations. Implementing this interface requires the following:
long values.
double values.
Users of an implementation of this interface calculate time measurements as follows:
long startTime = System.nanoTime().
long endTime = System.nanoTime().
long 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()