* NAME: timer->negate() * DESCRIPTION: invert the sign of a timer */
| 63 | * DESCRIPTION: invert the sign of a timer |
| 64 | */ |
| 65 | void mad_timer_negate(mad_timer_t *timer) |
| 66 | { |
| 67 | timer->seconds = -timer->seconds; |
| 68 | |
| 69 | if (timer->fraction) { |
| 70 | timer->seconds -= 1; |
| 71 | timer->fraction = MAD_TIMER_RESOLUTION - timer->fraction; |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | /* |
| 76 | * NAME: timer->abs() |
no outgoing calls
no test coverage detected