An event timer will post an event to the process that set the timer when the event timer expires.
An event timer is declared as a struct
etimer
and all access to the event timer is made by a pointer to the declared event timer.
Clock library (used by the timer library)
Files | |
file | etimer.c |
Event timer library implementation. | |
file | etimer.h |
Event timer header file. | |
Data Structures | |
struct | etimer |
A timer. More... | |
Functions | |
PROCESS_THREAD (etimer_process, ev, data) | |
void | etimer_request_poll (void) |
Make the event timer aware that the clock has changed. | |
void | etimer_set (struct etimer *et, clock_time_t interval) |
Set an event timer. | |
void | etimer_reset (struct etimer *et) |
Reset an event timer with the same interval as was previously set. | |
void | etimer_restart (struct etimer *et) |
Restart an event timer from the current point in time. | |
void | etimer_adjust (struct etimer *et, int timediff) |
Adjust the expiration time for an event timer. | |
int | etimer_expired (struct etimer *et) |
Check if an event timer has expired. | |
clock_time_t | etimer_expiration_time (struct etimer *et) |
Get the expiration time for the event timer. | |
clock_time_t | etimer_start_time (struct etimer *et) |
Get the start time for the event timer. | |
int | etimer_pending (void) |
Check if there are any non-expired event timers. | |
clock_time_t | etimer_next_expiration_time (void) |
Get next event timer expiration time. | |
void | etimer_stop (struct etimer *et) |
Stop a pending event timer. |
|
Adjust the expiration time for an event timer.
Definition at line 194 of file etimer.c. References timer::start, and timer. |
|
Get the expiration time for the event timer.
Definition at line 207 of file etimer.c. References timer::interval, timer::start, and timer. |
|
Check if an event timer has expired.
Definition at line 201 of file etimer.c. References p, and PROCESS_NONE. Referenced by tcpip_uipcall(). |
|
Get next event timer expiration time.
Definition at line 225 of file etimer.c. References etimer_pending(). |
|
Check if there are any non-expired event timers.
Definition at line 219 of file etimer.c. References NULL. Referenced by etimer_next_expiration_time(). |
|
Make the event timer aware that the clock has changed. This function is used to inform the event timer module that the system clock has been updated. Typically, this function would be called from the timer interrupt handler when the clock has ticked. Definition at line 143 of file etimer.c. References process_poll(). Referenced by PROCESS_THREAD(). |
|
Reset an event timer with the same interval as was previously set.
Definition at line 180 of file etimer.c. References timer, and timer_reset(). |
|
Restart an event timer from the current point in time.
Definition at line 187 of file etimer.c. References timer, and timer_restart(). Referenced by tcpip_uipcall(). |
|
Set an event timer.
Definition at line 173 of file etimer.c. References timer, and timer_set(). |
|
Get the start time for the event timer.
Definition at line 213 of file etimer.c. References timer::start, and timer. |
|
Stop a pending event timer.
Definition at line 231 of file etimer.c. References next, NULL, p, and PROCESS_NONE. |