version 1.1 | | version 1.2 |
---|
| | |
timers_table[i].mode = TIMER_MODE_DEAD; | | timers_table[i].mode = TIMER_MODE_DEAD; |
} | | } |
} | | } |
}; | | } |
}; | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* Creates a new timer. */ | | /* Creates a new timer. */ |
| | |
else | | else |
timers_table[id].delay = seconds() + delay; | | timers_table[id].delay = seconds() + delay; |
return TIMER_ERR_NONE; | | return TIMER_ERR_NONE; |
}; | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* Destroys an existing timer. */ | | /* Destroys an existing timer. */ |
| | |
return TIMER_ERR_ID; | | return TIMER_ERR_ID; |
timers_table[id].mode = TIMER_MODE_DEAD; | | timers_table[id].mode = TIMER_MODE_DEAD; |
return TIMER_ERR_NONE; | | return TIMER_ERR_NONE; |
}; | | } |
| | |
/*****************************************************************************/ | | /*****************************************************************************/ |
/* Finds a free ID for a new timer. */ | | /* Finds a free ID for a new timer. */ |
| | |
return i; | | return i; |
} | | } |
return TIMER_ERR_ID; | | return TIMER_ERR_ID; |
}; | | } |
| | |