I have tried to reset the timer based on the current time after clicking a button, but it doesnt work. Help :-(
private long startTime = System.currentTimeMillis();
Timer timer = new Timer(1000, this);
timer.start();
timer.stop();
long endTime = System.currentTimeMillis();
long timeInMilliseconds = (endTime - startTime);
timer.reset();