Function rclcpp::sleep_for
Defined in File utilities.hpp
Function Documentation
Use the global condition variable to block for the specified amount of time.
This function can be interrupted early if the associated context becomes invalid due to shutdown()
or the signal handler.
If nullptr is given for the context, then the global context is used, i.e. the context initialized by
rclcpp::init().See also
- Parameters:
nanoseconds – [in] A std::chrono::duration representing how long to sleep for.
context – [in] Optional which may interrupt this sleep
- Returns:
true if the condition variable did not timeout.