Last active
December 24, 2017 13:00
-
-
Save youtalk/ab48963dd1fd9cd6808f753c1c1e1ec7 to your computer and use it in GitHub Desktop.
Node::create_wall_timer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename DurationT, typename CallbackT> | |
typename rclcpp::WallTimer<CallbackT>::SharedPtr | |
Node::create_wall_timer( | |
std::chrono::duration<int64_t, DurationT> period, | |
CallbackT callback, | |
rclcpp::callback_group::CallbackGroup::SharedPtr group) | |
{ | |
auto timer = rclcpp::WallTimer<CallbackT>::make_shared( | |
std::chrono::duration_cast<std::chrono::nanoseconds>(period), | |
std::move(callback)); | |
node_timers_->add_timer(timer, group); | |
return timer; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename CallbackType> | |
using WallTimer = GenericTimer<CallbackType, std::chrono::steady_clock>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment