1 #ifndef EL__MAIN_TIMER_H
2 #define EL__MAIN_TIMER_H
6 /* Only available internally. */
9 /* Little hack, timer_id_T is in fact a pointer to the timer, so
10 * it has to be of a pointer type.
11 * The fact each timer is allocated ensure us that timer id will
13 * That way there is no need of id field in struct timer. --Zas */
14 typedef struct timer
* timer_id_T
;
16 /* Should always be NULL or you'll have to modify install_timer()
17 * and kill_timer(). --Zas */
18 #define TIMER_ID_UNDEF ((timer_id_T) NULL)
20 int get_timers_count();
21 void check_timers(timeval_T
*last_time
);
22 void install_timer(timer_id_T
*id
, milliseconds_T delay
, void (*)(void *), void *);
23 void kill_timer(timer_id_T
*id
);
24 int get_next_timer_time(timeval_T
*t
);