ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think my answer on the mailing list you linked is the right one:

You need to have something to wait on the timer (they do not create their own threads or anything) and so you need to add it to an executor. For that reason we create it through the node. It would be possible to have a timer which can be used with an executor and without a node, but that's not currently possible.

If you want a timer that automatically calls the callback without blocking (fire and forget), then you should consider using C++'s async and std::this_thread::sleep_for: