We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
would be possible to register a callback on timer functions, so I can be notified when there is a change (insert/remove) on the list?
reason: this way I can wake-up a semaphore, so it will request the time to sleep until next timer... (instead of implement a "fixed polling rate").
The text was updated successfully, but these errors were encountered:
Which particular timer type are you working with? I can send you a possible implementation for you to test.
Sorry, something went wrong.
I don't mind to do a code review before testing, do you have it on a branch?
I've done a quick change to etl::callback_timer on feature/#871-callback-on-timer-functions-to-handle-changes-in-the-time-list
etl::callback_timer
feature/#871-callback-on-timer-functions-to-handle-changes-in-the-time-list
I added member functions:-
void set_event_callbacks(event_callback_type insert, event_callback_type remove) void clear_event_callbacks()
Where event_callback_type is etl::delegate<void(etl::timer::id::type)>
event_callback_type
etl::delegate<void(etl::timer::id::type)>
I haven't written any unit tests for it yet.
If you want to set just one event callback then set the other to etl::callback_timer::event_callback{}
etl::callback_timer::event_callback{}
I didn't tested but I had a look and seems ok, would be possible to merge?
jwellbelove
No branches or pull requests
would be possible to register a callback on timer functions, so I can be notified when there is a change (insert/remove) on the list?
reason: this way I can wake-up a semaphore, so it will request the time to sleep until next timer... (instead of implement a "fixed polling rate").
The text was updated successfully, but these errors were encountered: