I have a panel where a small red circle is shown and after some time the red circle is replaced by a yellow circle and the user has to click in the panel as quickly as possible when seeing the yellow circle. So the reaction time is the time in milliseconds between the moment the yellow circle is shown and the moment the user clicks in the large panel. This test is repeated 5 times.
How can I calculate the reaction time using javax.swing.Timer
using System.currentTimeMillis()
for the start of timer and the average reaction time of the 5 tests? (its required to use this)