Timing hooks placed in code to acquire latencies for learning, tracking, detecting and total processing per frame