I have a python program that does the following: it aggregates questions for a list of questions that are saved in a text file, then it display the question to the user. After displaying the question, python opens a text box asking the user to input their answer. After they press "enter", the user is asked to rate his confidence with the answer on a scale of 1 to 5 (1 being very confident). After all questions are finished, the program saves the results in a text file.
The script for this has been written, but I want to add a time measurement script that measures the time from the moment the question appears, to the moment the user starts typing the first letter of the answer. Then I want the program to measure the time from the first keystroke, to the moment they press enter. So, again, I would like the program to measure two things: time from the moment the question appears to the first keystroke, and then from the first keystroke to the moment the user presses enter. Any help would be greatly appreciated.