public class RunTime extends java.lang.Object implements RunTimeInterface
| Constructor and Description |
|---|
RunTime() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRuntime(long runTime)
This method is used to add a runtime.
|
double |
getAverageRunTime()
This method is used to obtain the average runtime.
|
long |
getLastRunTime()
This method is used to retrieve the last runtime.
|
long[] |
getRunTimes()
This method returns an array of long values representing the last 10 runtimes.
|
void |
resetRunTimes()
This method is used to reset all 10 linear search times to zero.
|
public long getLastRunTime()
RunTimeInterfacegetLastRunTime in interface RunTimeInterfacepublic long[] getRunTimes()
RunTimeInterfacegetRunTimes in interface RunTimeInterfacepublic void resetRunTimes()
RunTimeInterfaceresetRunTimes in interface RunTimeInterfacepublic void addRuntime(long runTime)
RunTimeInterfaceaddRuntime in interface RunTimeInterfacerunTime - a long value representing the runtime in nanoseconds.public double getAverageRunTime()
RunTimeInterfacegetAverageRunTime in interface RunTimeInterface