void stop() throws SQLException, ClassNotFoundException {
		Activity activity;
		
		// Pause() will we executed for the case "stop" is pressed being in "play" status.
		pause();
		if (startTime > 0 && totalTime >= TimeBO.MINIMUM_TIME_DURATION) {
			try {
				activity = timerPanel.getSelectedActivity();
				Connection conn = Dao.getConnection();
				timeDao.insertTime(conn, new Time(activity.getIdActivity(), new Timestamp(startTime), 
						new Timestamp(pauseTime), totalTime, ""));
			} catch (SQLException | ClassNotFoundException ex) {
				throw ex;
			}
		}
		startTime = -1;
		totalTime = 0;
		// Refreshing the GUI
		timerPanel.resetControls();
	}