event_periodic_callback: add event_periodic_callback_oneshot()
Contribution description
Often there is a need to execute an event once after a delay. This adds a convenience helper function for it.
Testing procedure
A test for the new function has been added to tests/sys/event_periodic_callback
Issues/PRs references
Murdock results
:heavy_check_mark: PASSED
bef6232ed4ef62ab80cb2833633333e1ae1724ae tests/event_periodic_callback: add test for oneshot event
| Success | Failures | Total | Runtime |
|---|---|---|---|
| 10196 | 0 | 10197 | 15m:10s |
Artifacts
I'm not too familiar with the details of the different event queue APIs, but the naming event_periodic_callback_onshot() sounds confusing. I would expect to be an event either periodic or oneshot :P
I'm not too familiar with the details of the different event queue APIs, but the naming
event_periodic_callback_onshot()sounds confusing. I would expect to be an event either periodic or oneshot :P
I would not expect a periodic event to count but somehow it does looks a bit going a egg-laying-wool-milk-pig attempt to events which are not events but tasks that are parsed by workers named event threads
I think the naming of and the actual implementation is quiet fitting
I agree that this is confusing, we can do much better simply by not trying to stack too much on top of each other - see #21219