I start a timer with that : startTimer(0);
I wish restart this timer so I do that : getTimer(0,1);
I see that the timer stop and it never restart.
This is the code of "getTimer" :
Code: Select all
u32 getTimer(u16 numTimer, u16 restart)
{
const u32 t = getSubTick();
u32* time = &timer[numTimer & (MAXTIMER - 1)];
const u32 res = t - *time;
if (restart) *time = t;
return res;
}
Maybe I didn't understand something.. =\
Thank you.