Classes | |
| struct | timer |
Files | |
| file | timer.c |
| file | timer.h |
Functions | |
| void | timer_set (struct timer *t, clock_time_t interval) |
| void | timer_reset (struct timer *t) |
| void | timer_restart (struct timer *t) |
| int | timer_expired (struct timer *t) |
A timer is declared as a struct timer and all access to the timer is made by a pointer to the declared timer.
| int timer_expired | ( | struct timer * | t | ) |
| void timer_reset | ( | struct timer * | t | ) |
Reset the timer with the same interval.
This function resets the timer with the same interval that was given to the timer_set() function. The start point of the interval is the exact time that the timer last expired. Therefore, this function will cause the timer to be stable over time, unlike the timer_rester() function.
| t | A pointer to the timer. |
| void timer_restart | ( | struct timer * | t | ) |
Restart the timer from the current point in time
This function restarts a timer with the same interval that was given to the timer_set() function. The timer will start at the current time.
| t | A pointer to the timer. |
| void timer_set | ( | struct timer * | t, | |
| clock_time_t | interval | |||
| ) |
1.5.8