Cancellable timers: sorted_list::remove, timer cancel, replace done flag with timer cancellation
This commit is contained in:
@@ -17,8 +17,12 @@ void dispatch_init() {
|
||||
dlog("dispatch_init complete");
|
||||
}
|
||||
|
||||
void dispatch_schedule_ms(uint32_t ms, std::function<void()> fn) {
|
||||
timers.schedule_ms(ms, std::move(fn));
|
||||
timer_handle dispatch_schedule_ms(uint32_t ms, std::function<void()> fn) {
|
||||
return timers.schedule_ms(ms, std::move(fn));
|
||||
}
|
||||
|
||||
bool dispatch_cancel_timer(timer_handle h) {
|
||||
return timers.cancel(h);
|
||||
}
|
||||
|
||||
[[noreturn]] void dispatch_run(std::span<const handler_entry> handlers) {
|
||||
|
||||
Reference in New Issue
Block a user