-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix xmlrpc timeout using monotonic clock #1249
Conversation
in XmlRpcDispatch::work the _endTime check was using system time instead of monotonic time, so when time was set back it didn't process all events..
LGTM, but this should be confirmed to work correctly OS X and FreeBSD. |
Good point. |
The same code already exists in rostime. It should either be reused or at last be copied with a comment from where the code is coming and the same PP conditions should be used. |
Instead of copy-n-pasting a non-trivial code block like this wouldn't it be better to expose |
I thought it would be better to not add this dependency here, but I could do that if this is preferred... |
@dirk-thomas is it ok to leave it like this, or should we really add rostime as a dependency to xmlrpcpp? |
ping @dirk-thomas |
I think the risk is pretty high that when the implementation in |
so we can use these cross platform implementations elsewhere. See e.g. ros/ros_comm#1249
which depends on ros/roscpp_core#73 and assumes that it will be available with rostime 0.6.9
so we can use these cross platform implementations elsewhere. See e.g. ros/ros_comm#1249
I will have to release |
@ros-pull-request-builder retest this please |
|
||
gettimeofday(&tv, &tz); | ||
return (tv.tv_sec + tv.tv_usec / 1000000.0); | ||
ros_steadytime(sec, nsec); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might need the ros::
namespace?
I tried to fix this "on-the-fly" using the GitHub web interface which wasn't really successful. Can you please update the PR to make it pass CI. Thanks. |
Done. |
No problem. Thank you for addressing it quickly. |
* fix xmlrpc timeout using monotonic clock in XmlRpcDispatch::work the _endTime check was using system time instead of monotonic time, so when time was set back it didn't process all events.. * replace clock_gettime for OSX * xmlrpcpp: copy code from ros_steadytime for getTime * use ros_steadytime which depends on ros/roscpp_core#73 and assumes that it will be available with rostime 0.6.9 * fold build and run depend into depend tag to avoid version to be repeated * add missing namespace to ros_steadytime * add missing target_link_libraries * add missing lib to tests
so we can use these cross platform implementations elsewhere. See e.g. ros/ros_comm#1249
in XmlRpcDispatch::work the _endTime check was using system time instead of monotonic time,
so when time was set back it didn't process all events..