Example measuring javascript latency