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 explicit duration type for time_point to be compatible with macOS #848

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

light-tech
Copy link
Contributor

On macOS, std::chrono::system_clock::time_point has std::chrono::milliseconds for its duration so compilation fails.

Changing the declaration to one with an explicit duration template parameter std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> helps remove the system dependent implementation of std::chrono::system_clock.

… use std::chrono::nanoseconds as std::chrono::time_point template parameter to help compilation on macOS as its std::chrono::system_clock::time_point defaults to std::chrono::milliseconds for duration type
Copy link
Member

@destogl destogl left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks!

@bmagyar bmagyar merged commit ec2ba91 into ros-controls:master Nov 4, 2022
@cwecht
Copy link
Contributor

cwecht commented Nov 30, 2022

This issue still remains in humble. It would be great, if this patch could be backported to humble as well.

@jaron-l
Copy link
Member

jaron-l commented Nov 30, 2022

This issue still remains in humble. It would be great, if this patch could be backported to humble as well.

Feel free to make the pull request! This is a great idea and I'm sure everyone would appreciate your help.

@cwecht
Copy link
Contributor

cwecht commented Nov 30, 2022

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Nov 30, 2022

backport humble

❌ Command disallowed due to command restrictions in the Mergify configuration.

  • sender-permission>=write

cwecht pushed a commit to cwecht/ros2_control that referenced this pull request Nov 30, 2022
… use std::chrono::nanoseconds as std::chrono::time_point template parameter to help compilation on macOS as its std::chrono::system_clock::time_point defaults to std::chrono::milliseconds for duration type (ros-controls#848)
@cwecht cwecht mentioned this pull request Nov 30, 2022
cwecht pushed a commit to cwecht/ros2_control that referenced this pull request Nov 30, 2022
… use std::chrono::nanoseconds as std::chrono::time_point template parameter to help compilation on macOS as its std::chrono::system_clock::time_point defaults to std::chrono::milliseconds for duration type (ros-controls#848)
@destogl
Copy link
Member

destogl commented Nov 30, 2022

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Nov 30, 2022

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Nov 30, 2022
… use std::chrono::nanoseconds as std::chrono::time_point template parameter to help compilation on macOS as its std::chrono::system_clock::time_point defaults to std::chrono::milliseconds for duration type (#848)

(cherry picked from commit ec2ba91)
destogl pushed a commit that referenced this pull request Nov 30, 2022
… use std::chrono::nanoseconds as std::chrono::time_point template parameter to help compilation on macOS as its std::chrono::system_clock::time_point defaults to std::chrono::milliseconds for duration type (#848) (#866)

(cherry picked from commit ec2ba91)

Co-authored-by: light-tech <lightech@outlook.com>
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.

None yet

5 participants