mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-02 07:28:21 +00:00
timer: fix missing fired set
This commit is contained in:
@@ -15,7 +15,7 @@ static void insert(timer_t *timer, timerentry_t *entry, time_t us) {
|
|||||||
} else {
|
} else {
|
||||||
timerentry_t *search = timer->queue;
|
timerentry_t *search = timer->queue;
|
||||||
|
|
||||||
while(search) {
|
while (search) {
|
||||||
if (search->next == NULL) { // if last entry in the queue
|
if (search->next == NULL) { // if last entry in the queue
|
||||||
entry->next = NULL;
|
entry->next = NULL;
|
||||||
search->next = entry;
|
search->next = entry;
|
||||||
@@ -38,6 +38,8 @@ static void timercheck(timer_t *timer) {
|
|||||||
|
|
||||||
if (entry->repeatus)
|
if (entry->repeatus)
|
||||||
insert(timer, entry, entry->repeatus);
|
insert(timer, entry, entry->repeatus);
|
||||||
|
else
|
||||||
|
entry->fired = true;
|
||||||
|
|
||||||
dpc_enqueue(&entry->dpc, entry->fn, entry->arg);
|
dpc_enqueue(&entry->dpc, entry->fn, entry->arg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user