NanoTimer

public class NanoTimer

This is the NanoTimer class. It is an elapsed time clock with nanosecond precision, or at least as precise as the System.nanoTime() is.

Author

Anyi Lin - 10158 Scott's Bots

Aaron Yang - 10158 Scott's Bots

Harrison Womack - 10158 Scott's Bots

Constructors

Link copied to clipboard
public void NanoTimer()
This creates a new NanoTimer with the start time set to its creation time.

Functions

Link copied to clipboard
public long getElapsedTime()
This returns the elapsed time in nanoseconds since the start time of the NanoTimer.
Link copied to clipboard
public double getElapsedTimeSeconds()
This returns the elapsed time in seconds since the start time of the NanoTimer.
Link copied to clipboard
public void resetTimer()
This resets the NanoTimer's start time to the current time using System.nanoTime().