#include <clock.hpp>
◆ Clock()
Default c'tor.
Initializes the clock instance with the given clock_type.
- Parameters
-
clock_type | type of the clock. |
- Exceptions
-
◆ ~Clock()
rclcpp::Clock::~Clock |
( |
| ) |
|
◆ now()
Time rclcpp::Clock::now |
( |
| ) |
|
Returns current time from the time source specified by clock_type.
- Returns
- current time.
- Exceptions
-
◆ ros_time_is_active()
bool rclcpp::Clock::ros_time_is_active |
( |
| ) |
|
Returns the clock of the type RCL_ROS_TIME
is active.
- Returns
- true if the clock is active
- Exceptions
-
◆ get_clock_handle()
◆ get_clock_type()
◆ create_jump_callback()
These callback functions must remain valid as long as the returned shared pointer is valid.
Function will register callbacks to the callback queue. On time jump all callbacks will be executed whose threshold is greater then the time jump; The logic will first call selected pre_callbacks and then all selected post_callbacks.
Function is only applicable if the clock_type is RCL_ROS_TIME
- Parameters
-
pre_callback. | Must be non-throwing |
post_callback. | Must be non-throwing. |
threshold. | Callbacks will be triggered if the time jump is greater then the threshold. |
- Exceptions
-
- Warning
- the instance of the clock must remain valid as long as any created JumpHandler.
The documentation for this class was generated from the following file: