{"action":"created","issue":{"url":"https://api.github.com/repos/ros/roscpp_core/issues/37","labels_url":"https://api.github.com/repos/ros/roscpp_core/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/ros/roscpp_core/issues/37/comments","events_url":"https://api.github.com/repos/ros/roscpp_core/issues/37/events","html_url":"https://github.com/ros/roscpp_core/pull/37","id":114283186,"number":37,"title":"Adjusted return value of sleep() function","user":{"login":"kalectro","id":871408,"avatar_url":"https://avatars.githubusercontent.com/u/871408?v=3","gravatar_id":"","url":"https://api.github.com/users/kalectro","html_url":"https://github.com/kalectro","followers_url":"https://api.github.com/users/kalectro/followers","following_url":"https://api.github.com/users/kalectro/following{/other_user}","gists_url":"https://api.github.com/users/kalectro/gists{/gist_id}","starred_url":"https://api.github.com/users/kalectro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalectro/subscriptions","organizations_url":"https://api.github.com/users/kalectro/orgs","repos_url":"https://api.github.com/users/kalectro/repos","events_url":"https://api.github.com/users/kalectro/events{/privacy}","received_events_url":"https://api.github.com/users/kalectro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-30T14:43:19Z","updated_at":"2015-12-09T22:38:25Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ros/roscpp_core/pulls/37","html_url":"https://github.com/ros/roscpp_core/pull/37","diff_url":"https://github.com/ros/roscpp_core/pull/37.diff","patch_url":"https://github.com/ros/roscpp_core/pull/37.patch"},"body":"According to documentation sleep() should return false if the desired rate could not be met"},"comment":{"url":"https://api.github.com/repos/ros/roscpp_core/issues/comments/163423675","html_url":"https://github.com/ros/roscpp_core/pull/37#issuecomment-163423675","issue_url":"https://api.github.com/repos/ros/roscpp_core/issues/37","id":163423675,"user":{"login":"dirk-thomas","id":1335366,"avatar_url":"https://avatars.githubusercontent.com/u/1335366?v=3","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T22:38:25Z","updated_at":"2015-12-09T22:38:25Z","body":"After looking closer into ros/roscpp_core#39 I want to describe the problem more detailed:\r\n\r\n* [Rate::sleep](https://github.com/ros/roscpp_core/blob/c8ea96bb81baa1179566e503b4304392f7133b1c/rostime/include/ros/rate.h#L61-L65) claims to return `False` when the cycle time was exceeded.\r\n* But the [implementation](https://github.com/ros/roscpp_core/blob/c8ea96bb81baa1179566e503b4304392f7133b1c/rostime/src/rate.cpp#L56-L90) (line 86) returns `True` in that case\r\n\r\n* `WallRate::sleep` documents as well as implements that it returns `True` in that case (which makes the exceeded cycle indistinguishable).\r\n\r\nThe return value of `False` allows user land code to handle exceeded cycle times differently which is currently simply not possible since the code always return `True`. So for *Kinetic* we should update the `Rate::Sleep` to return `False` as well as update the doc and code of `WallRate::sleep` to return `False` in this case. I hope we all agree on that.\r\n\r\nNow the more difficult questions:\r\n\r\n1. Should we fix the implementation of `Rate:sleep` in *Indigo* and *Jade* which implies behavior change?\r\n2. Or should we fix the documentation of `Rate:sleep` in *Indigo* and *Jade* in order to document the actual behavior? (Nobody can act on passed cycles then, which you also can't do right now.)\r\n3. Should we update the doc and implementation of `WallRate:sleep` in *Indigo* and *Jade* which implies behavior change?"}}