Fixed function getTimeToBall