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