504 |
static void |
static void |
505 |
timer_pq_cleanup () |
timer_pq_cleanup () |
506 |
{ |
{ |
507 |
struct timer_pq_node *node = pq_del_min (&timer_q); |
struct timer_pq_node *node; |
508 |
|
|
509 |
for (node = pq_del_min (&timer_q); node; node = pq_del_min (&timer_q)) |
while ((node = (struct timer_pq_node *)pq_del_min (&timer_q))) |
510 |
free (node); |
free (node); |
511 |
|
|
512 |
|
pq_delete (&timer_q); |
513 |
} |
} |
514 |
|
|
515 |
/* Find next timer. */ |
/* Find next timer. */ |
557 |
alarm raises twice (eg. at 10:59:59 and 11:00:00). |
alarm raises twice (eg. at 10:59:59 and 11:00:00). |
558 |
By now I fix it avoiding an alarm raising twice in less |
By now I fix it avoiding an alarm raising twice in less |
559 |
than two seconds (Max). */ |
than two seconds (Max). */ |
560 |
#ifdef HI_RESOLUTION |
#ifdef DMX_HI_RESOLUTION |
561 |
if (timer->next_alarm == last_alarm) { |
if (timer->next_alarm == last_alarm) { |
562 |
#else |
#else |
563 |
if (timer->next_alarm <= (last_alarm + 2)) { |
if (timer->next_alarm <= (last_alarm + 2)) { |