Timer

public class Timer

This is the Timer class. It is an elapsed time clock with millisecond precision, or at least as precise as the System.currentTimeMillis() 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 Timer()
This creates a new Timer with the start time set to its creation time.

Functions

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