Verify loop_rate
I have set a loop rate in the following way:
ros::Rate r(100)
while(ros::Ok()){
ros::SpinOnce();
function();
r.sleep();
}
Is there anyway to verify if I am accomplish this rate or if the function is taking longer than that? Thank you.