ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
ros::WallTime start, end;
start = ros::WallTime::now();
// **** do something here... ****
end = ros::WallTime::now();
// print results
double dur_ros = (e_ros - s_ros).toNSec() * 1e-6;
2 | No.2 Revision |
ros::WallTime can be used as follows
ros::WallTime start, end;
start = ros::WallTime::now();
// **** do something here... ****
end = ros::WallTime::now();
// print results
double dur_ros execution_time = (e_ros (end - s_ros).toNSec() start).toNSec() * 1e-6;
ROS_INFO_STREAM("Exectution time (ms): " << execution_time);
3 | No.3 Revision |
ros::WallTime can be used as follows
ros::WallTime start, end;
start_, end_;
start start_ = ros::WallTime::now();
// **** do something here... ****
end end_ = ros::WallTime::now();
// print results
double execution_time = (end (end_ - start).toNSec() start_).toNSec() * 1e-6;
ROS_INFO_STREAM("Exectution time (ms): " << execution_time);