ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There is ros::Time
and ros::Duration
, which can be used in an intuitive way. ros::Time::now()
gives you the current time.
You probably want something like:
ros::Time start = ros::Time::now()
while(ros::Time::now - start < ros::Duration(5.0))
...
2 | No.2 Revision |
There is ros::Time
and ros::Duration
, which can be used in an intuitive way. ros::Time::now()
gives you the current time.
You probably want something like:
ros::Time start = ros::Time::now()
while(ros::Time::now while(ros::Time::now() - start < ros::Duration(5.0))
...