how to measure times between readings without using delay

I want to calculate the time it takes for me to press a button ten times. I cant use delay a that will effectively stop the program, so how can I do it??? Any suggestions?

Use the milis function. it returns the total time since the restart of the arduino.

Call it in the beginning
and after the code you want to measure time.

Then just subtract the difference.