/** @brief Cancel a delayed task */
void gras_timer_cancel_delay(double interval, void_f_void_t action) {
gras_msg_procdata_t pd=(gras_msg_procdata_t)gras_libdata_by_id(gras_msg_libdata_id);
- int cursor,found;
+ unsigned int cursor;
+ int found;
s_gras_timer_t timer;
found = FALSE;
/** @brief Cancel a repetitive task */
void gras_timer_cancel_repeat(double interval, void_f_void_t action) {
gras_msg_procdata_t pd=(gras_msg_procdata_t)gras_libdata_by_id(gras_msg_libdata_id);
- int cursor,found;
+ unsigned int cursor;
+ int found;
s_gras_timer_t timer;
found = FALSE;
/** @brief Cancel all delayed tasks */
void gras_timer_cancel_delay_all(void) {
gras_msg_procdata_t pd=(gras_msg_procdata_t)gras_libdata_by_id(gras_msg_libdata_id);
- int cursor, found;
+ unsigned int cursor;
+ int found;
s_gras_timer_t timer;
found = FALSE;
/** @brief Cancel all repetitive tasks */
void gras_timer_cancel_repeat_all(void){
gras_msg_procdata_t pd=(gras_msg_procdata_t)gras_libdata_by_id(gras_msg_libdata_id);
- int cursor, found;
+ unsigned int cursor;
+ int found;
s_gras_timer_t timer;
found = FALSE;
/* returns 0 if it handled a timer, or the delay until next timer, or -1 if no armed timer */
double gras_msg_timer_handle(void) {
gras_msg_procdata_t pd=(gras_msg_procdata_t)gras_libdata_by_id(gras_msg_libdata_id);
- int cursor;
+ unsigned int cursor;
gras_timer_t timer;
double now=gras_os_time();
double untilnext = -1.0;
DEBUG2("[%.0f] Remove %p now that it's done", gras_os_time(), timer->action);
xbt_dynar_cursor_rm(pd->timers, &cursor);
}
- action();
+ (*action)();
return 0.0;
} else if (untilthis < untilnext || untilnext == -1) {
untilnext = untilthis;