1
2
3
4
5
6
7
8
9
10
11
12
| /***
| * "Standard" way to handle count-down timers
| *
| */
| #ifndef COUNTDOWNTIMER_H
| #define COUNTDOWNTIMER_H
|
| #define CDT_RESET(timer, countdown) (timer) = (countdown)
| #define CDT_EXPIRED(timer) ( ((timer) > 0) ? !(--(timer)) : 1 )
| #define CDT_HASEXPIRED(timer) (0 == (timer))
|
| #endif
|
|