App based on reaction time

actually, I am making a game where random texts are appearing with random colours and the person has to select the answer which can be either red, yellow, blue or green coloured buttons. If the button colour matches the colour of the random text and not the text itself, he gets a SCORE. For each answer he gives, I need the reaction time from the onset of that random coloured random text till the person presses the answer button. This has to be done for every random text separately and in the end, the mean of all reaction times has to be displayed. Any help in this regard would be highly appreciated. Thanks in advance:)
Moreover, the text random appears 40 times so 40 reaction times need to be calculated and towards the end, the mean of those 40 reaction times needs to be calculated.

see my answer here

good luck with our homework...
I will close this thread... let's use one thread for this homework only...