Open KammutierSpule opened 3 months ago
Which particular timer type are you working with? I can send you a possible implementation for you to test.
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
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)>
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{}
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").