Skip to content
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

use this_thread::sleep_for on Windows #32

Merged

Conversation

kejxu
Copy link
Contributor

@kejxu kejxu commented Jan 31, 2019

usleep is not available on Windows, replace it with this_thread::sleep_for (available since c++11)

also a minor indentation update in include/realtime_tools/realtime_publisher.h, converted existing tabs to spaces

Copy link
Contributor

@mathias-luedtke mathias-luedtke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Why did you keep usleep? For melodic we can switch to std::chrono right away.

@kejxu
Copy link
Contributor Author

kejxu commented Feb 1, 2019

Why did you keep usleep? For melodic we can switch to std::chrono right away.

we are keeping usleep just so it would not change the existing behavior on Linux, will remove the macro guard and apply this change to both Linux and Windows

@mathias-luedtke mathias-luedtke merged commit 8fbac0c into ros-controls:melodic-devel Feb 4, 2019
@kejxu kejxu deleted the use_sleep_for_on_Windows branch February 4, 2019 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants