Elapsed time between two functions

Thanks yet again for the help, I will have to start paying you tuition fee :smiley:
Now, In the meantime I got it solved myself.
I wanted to measure the time that the game takes to switch the two states, not the whole gaming time. I got it by incrementing the delta seconds from tick event in a variable and setting it back to 0 after printing it just after the other state.
The main goal is a success now: No matter the game’s frame rate, the player’s reaction time has to be exactly the same. So if I demand a 0.15, (it will be 0.150004 anyway, processor speed), so 0.15 both on 60 fps, 20 fps and 600 fps. I spent half a day setting this up because of the diversity of Android devices, and this system actually takes the FPS drops into account as well, as soon as they appear.
Simple physics, really, wonder why it took me this long.
I mentioned those gates. The gate’s speed is got by this:
I have a max distance that it has to travel. I calculate it, easy as ABC.
Then I divide it by the time I want the gate to go from bottom to top. I multiply the answer with the frame’s delta seconds (= i divide by the FPS) and I have the gate speed, measurement in units/frame.
Then I have the distance, multiply it by the reaction time required (in secs), and divide by the secs needed to go from bottom to top (this last step to get a unit). and this will be the height difference that the gate can travel while it is open.
I sent this post so I can check if it works, and yes, it does.
After all, a reaction time based game has to be accurate.