MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / mad_timer_negate

Function mad_timer_negate

modules/data/mp3/libmad/mad_timer.c:65–73  ·  view source on GitHub ↗

* NAME: timer->negate() * DESCRIPTION: invert the sign of a timer */

Source from the content-addressed store, hash-verified

63 * DESCRIPTION: invert the sign of a timer
64 */
65void 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()

Callers 2

mad_timer_absFunction · 0.85
mad_timer_multiplyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected