This question already has an answer here:
- Time-Sensitive Echo 19 answers
A simple code golf challenge similar to an already existing, but more complex one:
- Wait for user to press enter.
- Wait for user to press enter again.
- Print the elapsed time between the 1. and 2.
- Wait an equal amount of time
- Print the actual elapsed time of 4.
Order of 3. and 4. is not important. Notice that the second printout entails actual timekeeping during the machine's delay; just outputting the desired delay is not enough.
The time outputs should be in seconds, with at least 10 ms resolution.