basic code for measuring latency to get input