Time delay between the cycles
Hi Guys,
I have below snippet of the code.
ros::Rate rate(50);
while (ros::ok())
{
ros_time = ros::Time::now();
//Do some operations
//Publish messages
rate.sleep();
ros.SpinOnce();
}
I want to know the time gap/delay between each publish of messages. Could you please let me know if there a way to fetch the time delay ?
Thank you, KK