Android Question Time delay or elapse for the button click event

hascentre

New Member
Licensed User
Longtime User
Is there a way to find the time delay, elapse or latency for the button click event to activate after pressing it physically on screen?
I want to develop android app to test the human reaction time but the button delay time is quite large, around 100-200ms. I need to correct for this system error.
 

hascentre

New Member
Licensed User
Longtime User
Use a panel and handle the touch action.
Thanks a lot for your kind advice. Would it be faster to use the Activity's own touch action? i.e. if a panel is added, will the touch action be activated in the panel or the activity screen first?
 
Upvote 0

Mostez

Well-Known Member
Licensed User
Longtime User
you may use timer with interval time of 1ms, and create global counter var, in timer sub increment that global counter with 1. when button down enable timer, when button up, stop timer and read the value of global counter.

another method is to read DateTime.Now when button is down and read again when up, to get delay in millis
 
Upvote 0
Top