Allow BT factory to define clock source for TimerQueue/TimerNode #215
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request extends the utility of the TimeoutNode decorator node class to allow for the use of a custom clock. This is especially useful when someone is creating a simulated version of their code that uses a clock different from the system/steady_clock. Template parameters were added to both the TimeoutNode and TimerQueue classes so the caller may specify the clock source. Necessary changes were made in the bt_factory.cpp class to register the TimeoutNode with default template parameters. Template deduction and the associated syntax was improved in C++17, so the empty template argument list may be removed if this library is updated to C++17 in the future.