-
Notifications
You must be signed in to change notification settings - Fork 272
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
Conversation
… 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
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.
Looks good to me! Thanks!
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. |
@Mergifyio backport humble |
❌ Command disallowed due to command restrictions in the Mergify configuration.
|
… 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)
… 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)
@Mergifyio backport humble |
✅ Backports have been created
|
… 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>
On macOS,
std::chrono::system_clock::time_point
hasstd::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 ofstd::chrono::system_clock
.