Go to the source code of this file.
Detailed Description
Timer related functions.
Definition in file timers.c.
Function Documentation
| int cftimer_create |
( |
int |
id, |
|
|
long |
delay, |
|
|
object * |
ob, |
|
|
int |
mode |
|
) |
| |
Creates a new timer.
- Parameters:
-
- Return values:
-
| TIMER_ERR_NONE | Timer was successfully created. |
| TIMER_ERR_ID | Invalid ID. |
| TIMER_ERR_MODE | Invalid mode. |
| TIMER_ERR_OBJ | Invalid object. |
Definition at line 89 of file timers.c.
| int cftimer_destroy |
( |
int |
id | ) |
|
Destroys an existing timer.
- Parameters:
-
| id | Identifier of the timer to destroy. |
- Return values:
-
| TIMER_ERR_NONE | No problem encountered. |
| TIMER_ERR_ID | Unknown ID: timer not found. |
Definition at line 136 of file timers.c.
| int cftimer_find_free_id |
( |
| ) |
|
Finds a free ID for a new timer.
- Returns:
- TIMER_ERR_ID if no free ID is available, a nonzero free ID otherwise.
Definition at line 156 of file timers.c.
Initialize timers.
Definition at line 173 of file timers.c.
| static void cftimer_process_event |
( |
object * |
ob | ) |
[static] |
Triggers the EVENT_TIMER of the given object.
- Parameters:
-
| ob | Object to trigger the event for. |
Definition at line 70 of file timers.c.
| void cftimer_process_timers |
( |
| ) |
|
Processes all timers.
Definition at line 38 of file timers.c.