package scheduler;

/**
 * A class to track the start and end time of a task
 */
public class TaskTime {
	private long startTime;
	private long stopTime;

	/**
	 * Record a start time for a task
	 *
	 * @param startTime
	 */
	public TaskTime(long startTime) {
		this.startTime = startTime;
	}

	/**
	 * Record the stop time for this task
	 *
	 * @param stopTime
	 */
	public void setStopTime(long stopTime) {
		this.stopTime = stopTime;
	}

	/**
	 * Get the elapsed time of the task
	 *
	 * @return the start time - the end time
	 */
	public double getElapsedTime() {
		return stopTime - startTime;
	}
}
