{"action":"opened","issue":{"url":"https://api.github.com/repos/davetcoleman/ros_control_boilerplate/issues/4","repository_url":"https://api.github.com/repos/davetcoleman/ros_control_boilerplate","labels_url":"https://api.github.com/repos/davetcoleman/ros_control_boilerplate/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/davetcoleman/ros_control_boilerplate/issues/4/comments","events_url":"https://api.github.com/repos/davetcoleman/ros_control_boilerplate/issues/4/events","html_url":"https://github.com/davetcoleman/ros_control_boilerplate/issues/4","id":151100281,"number":4,"title":"controller_manager_->update uses a new timepoint","user":{"login":"ThomasTimm","id":1158034,"avatar_url":"https://avatars.githubusercontent.com/u/1158034?v=3","gravatar_id":"","url":"https://api.github.com/users/ThomasTimm","html_url":"https://github.com/ThomasTimm","followers_url":"https://api.github.com/users/ThomasTimm/followers","following_url":"https://api.github.com/users/ThomasTimm/following{/other_user}","gists_url":"https://api.github.com/users/ThomasTimm/gists{/gist_id}","starred_url":"https://api.github.com/users/ThomasTimm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThomasTimm/subscriptions","organizations_url":"https://api.github.com/users/ThomasTimm/orgs","repos_url":"https://api.github.com/users/ThomasTimm/repos","events_url":"https://api.github.com/users/ThomasTimm/events{/privacy}","received_events_url":"https://api.github.com/users/ThomasTimm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-26T10:41:19Z","updated_at":"2016-04-26T10:41:19Z","closed_at":null,"body":"In the control loop in https://github.com/davetcoleman/ros_control_boilerplate/blob/jade-devel/src/generic_hw_control_loop.cpp#L69 a timestamp is fetched in line 72 with clock_gettime(), but when you call the update function in line 92, a new timestamp is used.\r\n\r\nThe read-function in-between on line 89 is not realtime safe, so you risk an arbitrary big difference between these two timestamps.\r\nWould it not be more correct to reuse the current_time timestamp in the call to update, especially if the duration of the read-call is varying?"}}