Code to test touch input latency