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()
RunTimeInterface
getLastRunTime
in interface RunTimeInterface
public long[] getRunTimes()
RunTimeInterface
getRunTimes
in interface RunTimeInterface
public void resetRunTimes()
RunTimeInterface
resetRunTimes
in interface RunTimeInterface
public void addRuntime(long runTime)
RunTimeInterface
addRuntime
in interface RunTimeInterface
runTime
- a long value representing the runtime in nanoseconds.public double getAverageRunTime()
RunTimeInterface
getAverageRunTime
in interface RunTimeInterface